Skip to content
Motion & statesMarkdown

Motion

Motion uses five φ-derived durations (100 · 162 · 262 · 424 · 686 ms) and three restrained cubic-bezier curves (standard, enter, exit). Bounce, elastic easing, and auto-playing loops longer than 5s without a pause control are left out.

Durations and easings

TokenTailwindDurationUse
--duration-100duration-100100msMicro feedback: hover, focus ring, small icon swap
--duration-162duration-162162msDefault control transition: buttons, inputs, switches
--duration-262duration-262262msMedium reveal: dropdowns, tooltips, popovers
--duration-424duration-424424msPanel movement: sheets, accordions, drawers
--duration-686duration-686686msExpressive entrance: homepage reveals only
TokenTailwindCurveUse
--ease-standardease-standardcubic-bezier(0.2, 0, 0, 1)Default state and layout transitions
--ease-enterease-entercubic-bezier(0, 0, 0.2, 1)Elements entering the viewport or opening
--ease-exitease-exitcubic-bezier(0.4, 0, 1, 1)Elements leaving the viewport or closing

Use 100–262ms for docs and UI state transitions. Reserve 424–686ms for panel movement and homepage entrances.

Interactive demos

Duration demos (click Play)

prefers-reduced-motion: no-preference (transform)
duration-100 (100ms)
--duration-100
duration-162 (162ms)
--duration-162
duration-262 (262ms)
--duration-262
duration-424 (424ms)
--duration-424
duration-686 (686ms)
--duration-686

Easing curve demos (424ms, click Play)

ease-standard
cubic-bezier(0.2, 0, 0, 1)
ease-enter
cubic-bezier(0, 0, 0.2, 1)
ease-exit
cubic-bezier(0.4, 0, 1, 1)

Click Play on any row to preview the duration or easing curve. When prefers-reduced-motion: reduce is active, demos swap translation for opacity.

Usage

Apply duration and easing utilities in Tailwind CSS or custom properties in CSS:

<button
  type="button"
  className="rounded-md bg-primary px-4 py-2 text-primary-foreground transition-colors duration-162 ease-standard"
>
  Hover transition
</button>
.drawer-panel {
  transition: transform var(--duration-424) var(--ease-enter);
}

@media (prefers-reduced-motion: reduce) {
  .drawer-panel {
    transition: opacity var(--duration-162) var(--ease-standard);
  }
}

Do and don't

Do: Swap movement for opacity under reduced motion
Use duration-100 through duration-686 with ease-standard, ease-enter, or ease-exit, and remove spatial translation when prefers-reduced-motion: reduce is set.
Don't: Use bounce easing or auto-looping motion
Do not use ease-linear, spring overshoot curves, or unpaused animations longer than 5 seconds (WCAG 2.2.2).

Accessibility

  • Respect prefers-reduced-motion: reduce by removing translation and keeping opacity transitions at most.
  • Never autoplay decorative loops longer than 5s without a visible pause control (WCAG 2.2.2).

Rationale

φ-scaled durations create proportional timing steps from micro-hover (100ms) to panel motion (424ms), while locked easing tokens prevent jarring linear or bouncy motion.