Motion

Short, springy and physical, like soft toys. Durations stay between 80 and 360 ms. Everything stops under prefers-reduced-motion.

Utilities

Add a class to any element. Click a tile to replay it.

Built into components

ComponentMotion
ButtonHover lifts 2 px and grows the wall; press sinks it with a 2% squash (80 ms), release springs back with overshoot.
CheckboxBox does a jelly wobble; the tick is stamped in, rotating from −12°.
SwitchThumb rolls with a bounce and squashes as it lands.
SliderThumb swells on hover and flattens while dragged.
TabsOne raised tile slides to the active tab with overshoot; the panel rises in.
ProgressFill springs to its value; stripes roll; at 100% it glints.
TooltipSwings in like a hanging tag.
DialogOverlay fades; the board bounces in and drops away on close.
InputShakes once when it becomes invalid.

Tokens

TokenValueUse
--cz-motion-instant80ms
--cz-motion-fast140mshover, press
--cz-motion-base220mstoggles, tabs, tooltips
--cz-motion-slow360msdialogs, toasts, progress
--cz-motion-ease-outcubic-bezier(0.2, 0.8, 0.2, 1)
--cz-motion-ease-bouncecubic-bezier(0.34, 1.56, 0.64, 1)toy-like overshoot; USS: ease-out-back
--cz-motion-ease-springcubic-bezier(0.5, 1.8, 0.4, 0.8)stronger overshoot for pops

Keyframes animate the individual translate, scale and rotate properties, so they never fight the transform that Radix and sonner use for positioning.

.my-coin-burst {
  animation: cz-pop var(--cz-motion-slow) var(--cz-motion-ease-out) both;
}