Skip to example

Layout 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.

Svelte

Source code