How to Create an Interactive Grid Animation

Took isometric for a spin this weekend using LottieFiles State Machines ✨ Here’s the step-by-step breakdown.

Comp 2_16.mp4

Step 1 – Define Segments
Break your animation into clear segments. These segments form the states of your state machine and allow smooth transitions between different parts of the animation.

Comp 2_17.mp4

Step 2 – Mark Interactivity Zones
Decide which areas of your animation should respond to user actions (like hover or click). Think of these as hotspots that you’ll later map to changes in inputs.

Comp 2_18.mp4

Step 3 – Set the Initial State
Open the State Machine tab and assign your first segment as the initial state. For example, this could be your idle or default animation loop.

Comp 2_19.mp4

Step 4 – Add Other States, Inputs & Transitions
Bring in the additional segments you want to transition to, and at the same time create the inputs that will control those transitions. In this case:

  • Boolean input (true/false): Controls whether the Wi-Fi toggle is on or off.

  • Event input: Used for an on-complete transition, so the animation can automatically move into an idle loop once the previous segment finishes.

This setup ensures your grid animation responds to user actions while also having smooth, automated transitions when needed.

Once your inputs are set, link the segments together with transitions. Define the conditions that must be met for each transition like for instance, when the Boolean changes to true, the state machine can move from the “off” state to the “on” state.

For on-complete, setup in the segment as an on complete action. In this case, I have created an event input called .

Comp 2_20.mp4

Step 5 - On-hover Zoom-in

Now, add hover states to your segments to achieve the zoom in for the different features on the map. To achieve hover-in and hover-out effects, use:

  • Pointer Enter → sets the input to true to activate the hover state.

  • Pointer Exit → sets the input back to false to deactivate the hover state.

This gives your animation dynamic feedback as users move their cursor over and away from interactive areas. Check out the video below


Comp 2_21.mp4


After this, repeat the exact step as above for the other two zoom-ins and congratulations! You now have your very own interactive grid map.


Comp 2_22.mp4

You can check out the animation in code with the link below

https://codepen.io/Yaamin-Mohamed/full/yyeBrdN