SwiggyTaruun MalikExplainer
Nostalgia, Coupons, and a State Machine: The Swiggy Mother’s Day Story
Summary
Swiggy’s Mother’s Day campaign turned childhood nostalgia into an interactive game where users scanned virtual “mom weapons” such as a jhadu, chappal, wooden spoon, and belt to unlock coupons and cashback. The experience used Rive’s runtime animations, state machines, ViewModel properties, and backend data binding to drive scan-triggered states, reward values, and a dynamically assembled share page. Design authored visual logic inside Rive while engineering connected typed values from the React application, including strings and booleans for coupon labels and reveal transitions. A debugging issue showed that the Rive artboard needed the correct ViewModel binding and that a numeric value could not substitute for a boolean state-machine input. The team concludes that, after a learning curve, Rive reduced custom animation work and let design and engineering proceed with less blocking.
Context
Swiggy wanted to turn the nostalgia and mixed dread associated with childhood mothers into a playable Mother’s Day experience rather than a greeting card or discount banner. The campaign also required animations and rewards to respond to user interactions and real-time backend data.
Approach / What changed
The team built the experience with Rive state machines, ViewModel properties, and platform runtime integration. Users scanned illustrated childhood “mom weapons” to trigger states and unlock rewards, while engineering passed backend values into the animation and Rive handled visual logic, transitions, dynamic assets, and the share-page reveal.
Takeaways
Rive state-machine transitions are typed against the inputs configured in the editor; passing a number where a boolean is expected can cause a transition to silently fail.
The Rive ViewModel must be linked to the artboard before runtime values can drive the animation. Values may update in React while producing no visible result if that binding is missing.
The implementation let designers own motion logic and visual states while engineers supplied backend data, reducing the custom animation and coordination work required for the campaign.
Source and freshness
- Source
- medium.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.