An animated toggle communicates a change between two values. An interactive version also responds to an input rather than playing a fixed movie.
Watch the tutorial
How to Create an Animated Day & Night Toggle on iPad (6:12).
Watch the short preview on YouTube (0:16).
Build your own toggle
- Draw both visual states. Create the track, movable thumb and day/night symbols. Keep independently animated shapes on separate layers.
- Plan the transitions. Make the two end poses and use keyframes to animate position, rotation, opacity or color as appropriate.
- Connect the behavior. Use named clips in the Logic workspace and a boolean input to distinguish day from night. Set conditions for the two directions.
- Test touch. Add a target where the user should interact and verify both directions in the Test Preview. Check that the input and active state agree.
- Choose the output. A movie or GIF shows one sequence; a compatible runtime can respond to input using a .kvk file.
Common problems
- The toggle changes only once: check that both transition directions exist.
- The thumb moves unexpectedly: check its pivot and position keyframes.
- The result is not interactive after export: distinguish a rendered animation from a runtime package.