design-infraGitHub
Report a problem or share feedback← Catalog

AnimateView: Toggle

free

motion/animate-view-toggle

An example of using AnimateView to animate a toggle switch with smooth update animations using Motion for React.

state — subtlerecipeRefinedPlayful
$pnpm add motion # then adapt the free source from https://motion.dev/examples/react-animate-view-toggle

npm deps: motion

AnimateView: Toggle preview
Source
Motion (motion.dev)
Kind
transition
Categories
transition, input
Use as
recipe — technique you apply to your own markup
Applies to
input
Motion
on state · subtle · motion · medium cost
Tags
motion, spring, AnimateView
Licence
motion / motion/react / motion-v are MIT. Motion+ (premium components, example source, AI Kit pro tools) is paid — one-time Personal licence or per-seat Business.
Live demo
motion.dev
Docs
motion.dev