design-infraGitHub
Report a problem or share feedback← Catalog

Layout animation

curatedfree

motion/layout-animation

An example of animating a layout change using Motion for React's simple layout prop.

state — subtlerecipeRefinedMinimalPlayful
$pnpm add motion # then adapt the free source from https://motion.dev/examples/react-layout-animation

npm deps: motion

Our notes

`layout` prop: elements animate to their new size/position when state changes (expanding cards, accordion rows, reflowing grids). No height hacks. Free example (motion is MIT); copy and adapt the source from the example page.
Layout animation preview
Source
Motion (motion.dev)
Kind
transition
Categories
transition
Use as
recipe — technique you apply to your own markup
Applies to
cardaccordiontable
Motion
on state · subtle · motion · low cost
Tags
motion
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