TypeScript
Your editor knows every component's parts and states, every CSS property and vael-ui's timing tokens. A mistake turns red before you save.
Autocomplete
Select a name in the code to see what your editor suggests there, then pick one to insert it.
The same names are listed in Dialog's Motion section.
Mistakes are type errors
vael-ui's own type tests check that each of these stays an error, so no release starts accepting one by accident.
<Dialog :motion="{ initial: { backdrop: { opacity: 0 } } }" /><Dialog :motion="{ initial: { panel: { opacityy: 0 } } }" /><Dialog :motion="{ spring: { damping: 1 }, duration: 200 }" /><Input :motion="{ states: { success: { root: { opacity: 1 } } } }" /><Dialog :motion="{ stagger: 0.05 }" />const style: MotionStyle = { spring: { damping: 1 } }Units
A plain number uses the unit shown. A string goes straight to CSS, so '2rem' and '50%' work too.
duration: 250millisecondsdelay: 0.1secondsstagger: 0.04secondsspring.response: 0.35secondsx: 12pixelsblur: 4pixelsrotate: 90degreesopacity: 0.5no unit
Timing tokens
duration and easing accept vael-ui's tokens, and your editor lists them. Below are their current values on this page. Pick a preset from the motion menu in the header, and the tokens a spring drives change with it.
--ui-duration-press0 ms--ui-duration-enter0 ms--ui-duration-exit0 ms--ui-duration-tooltip0 ms--ui-duration-toast0 ms--ui-duration-drawer0 ms--ui-duration-drawer-exit0 ms
--ui-ease-out--ui-ease-in-out--ui-ease-drawer--ui-ease-pop--ui-ease-bounce--ui-ease-toast--ui-ease-number
In the console
In development, vael-ui logs what went wrong and what to change. Production builds leave these messages out.
[vael-ui motion] Dialog enter: something was still animating when the hook returned. Return the animation so Dialog waits: `enter: (parts) => gsap.to(...)`.
[vael-ui motion] <div class="card"> has its own CSS transition on opacity, which motion animates too: they fight. Take it out of your CSS, or set it through the motion's values.
[vael-ui motion] `after: 'titel'` names nothing that was marked; starting without waiting.
To see what moved and why, inspect the component. data-motion names the layers that set its motion, and each open and close shows on the Timings track of the Performance panel.