Motion guide · 1 of 8
Getting started
vael-ui components animate out of the box. You can change how they move for one component or for your whole app, with the same few options.
It already moves
Open the dialog, the select and the toast below. Every overlay, list and control has built-in motion. It stays short, and it closes faster than it opens.
Change one component
Every component takes a motion prop. Set where a part comes in from, such as initial: { panel: { y: 32 } }, and the spring it moves on.
Timing
Motion runs on a spring or on a duration. A spring takes a name, 'snappy', 'smooth', 'bouncy' or 'gentle', or its damping and response. A duration in ms takes any CSS easing, or one of vael-ui's by name, such as 'out', 'pop' or 'bounce', which lands like a dropped ball. On a spring, positions and sizes ride it, and opacity, colors and blur ease. The names are a feel, not exact curves: 'in-out' passes the middle a little early, so scrub with 'linear'.
One spring for everything
Put a spring on ConfigProvider, and every component inside uses it. damping below 1 overshoots, and response is roughly how long it takes, in seconds. Or name it: 'snappy', 'smooth', 'bouncy' or 'gentle'.
Turn it off
:motion="false" on a component, or on ConfigProvider for everything inside, makes opening and closing instant. While motion is on, people who ask for reduced motion get the fades without the movement. Loaders keep spinning, since that tells people something is still happening.