Token-Driven Battery Animation with State Machines

I designed this token-driven battery animation for real-time UI use. Motion tokens control the percentage text, wave fill position, and color, making it easy to connect to live data. There are two motion token groups currently embedded in the animation: default (battery up to 20%) and low battery (battery below 20%).

It also includes a state machine for smooth transitions between idle and charging states.

I focused on scalability, clean structure, and easy integration.

I’d love your feedback, especially on the token setup and state transitions.

Check it out in the community

Let me know if you’d like a remix link to try this animation yourself.
Cheers!