Toggle switch animation
At 48 px
Static alternative
Reduced-motion preference pauses autoplay. Use a static state in your app when motion is reduced.
A round thumb moves across a track that changes to green.
One-shot transition. The preview loops it; your app controls when it runs.
Customize the toggle switch
- Play the preview and compare the small-size and static examples below.
- Edit Toggle knob x-position keys to control travel. Keep the on-track opacity synchronized with the thumb.
- Use the color controls to match your interface. Set Speed to retime every project keyframe together.
- Download the editable project or open it in the editor for shape and keyframe changes.
This file illustrates off-to-on. Your application owns the boolean state, keyboard input, and accessible switch role.
Keep your edits and choose an export
Download editable project saves your current colors and timing as a .motion backup, without an account. Reopen it in Lottieditor to continue editing. It is not a Lottie player file.
The editor requires sign-in for animation exports. Free accounts get five watermarked GIF exports per month. Pro provides unwatermarked Lottie, dotLottie, GIF, and browser-supported video exports. View editor plans.