Animate on state changeLayout animation
An example of using Motion's animateLayout function in Svelte. The update function calls flushSync() so Svelte applies the state change before Motion measures the new layout.
Matt PerryOctober 9, 2026- Svelte
Source code
Related examples
Animate on state change
View animation
Hover



