Skip to content
Design SystemsPublished Updated 8 min read

Quiet UI Motion: Naming Transition Properties, Timing Budgets, and Reduced Motion

How Haze UI uses a closed vocabulary of transitions, durations, and prefers-reduced-motion rules so motion clarifies without lagging.

View .md

Most developers know the difference between an interface that feels crisp and one that feels sluggish, even when both have identical features. The difference rarely comes from big hero choreography—it lives in whether a dropdown row lags behind your mouse pointer, whether transition-all accidentally animates a border box during a theme change, or whether pressing a button gives immediate physical confirmation.

In Haze UI, motion is governed by a closed vocabulary documented in our Motion guidelines and verified statically by pnpm check:vocab. Here are the rules and timing budgets behind that system.

Never write transition-all

Every time a component uses transition-all, two bugs wait patiently for later:

  1. Unintended property interpolation. When a theme toggles or a container resizes on responsive breakpoints, transition-all animates background fills, padding, border widths, and layout shifts simultaneously.
  2. Wasted style-recalculation budgets. Watching dozens of properties across hundreds of list items costs main-thread frame time even when nothing visually changes.

Instead, name the exact properties changing on state transitions:

  • Color-only hover states: transition-colors
  • Pressable Button: transition-[background-color,border-color,color,box-shadow,opacity,scale,text-decoration-color]
  • Entering/exiting Dialog: transition-[opacity,scale,translate,overlay,display] transition-discrete
  • Sliding Tabs thumb: transition-[translate,width,height]

Notice also that modern CSS exposes translate, scale, and rotate as standalone properties independent of transform, so button presses (active:scale-[0.97]) never collide with entrance slides (translate-y-2).

Timing budgets and three easing curves

Response duration dictates whether an interaction feels physical or sticky. No interactive response in Haze UI runs longer than 300 ms:

Interaction type Duration token Easing preset Reference example
Menu row sweep duration-75 ease-snappy Dropdown Menu, palette options
Button press down duration-75 / duration-100 ease-snappy active:scale-[0.97] on Button
Hover border or color shift duration-150 ease-snappy Card borders, nav links
Modal, popover, switch thumb duration-200 ease-snappy Dialog, Popover, Switch
Drawer slide & accordion panel duration-300 ease-snappy Drawer, Accordion
Micro checkmarks & radio dots duration-200 ease-spring Checkbox check mark, chevron rotation
Indeterminate progress & shimmer 1.2s–1.6s ease-smooth Progress bars and loading skeletons

Why keep ease-spring (cubic-bezier(0.34, 1.56, 0.64, 1)) strictly for tiny icons like check marks and copy ticks? Overshooting a 16 px check mark feels tactile. Overshooting a 480 px dialog or drawer makes the entire screen bounce like jelly. Reserve overshoot strictly for marks smaller than an icon.

The 75 ms menu-sweep exception

Early code reviews in Haze UI suggested unifying menu-item hovers at 150 ms to match button hovers. Testing immediately proved why that fails in practice: when you move a cursor rapidly down an eight-item menu, a 150 ms fade leaves two or three trailing rows partially highlighted behind the pointer.

Keeping menu items at duration-75 lets the highlight track the cursor cleanly row-by-row—while leaving buttons, cards, and tabs at 150 ms.

Page entrance restraint vs. continuous motion

On initial page load, excessive staggered delays starve content visibility. Haze UI limits page-load entrance animations to at most two groups on hero sections (headline copy followed 80 ms later by the stage or action group) running animate-rise over 320 ms starting from opacity: 0.4; translate: 0 4px.

Notice the starting opacity is 0.4, not 0—so text remains legible even during the opening millisecond, and nothing else down the page waits invisible below the fold. Equally important: zero infinite animations run passively on marketing pages unless a real loading process or live indicator requires them.

Complete prefers-reduced-motion coverage (including pseudo-elements)

Writing @media (prefers-reduced-motion: reduce) with only *, ::before, ::after misses modern CSS pseudo-elements—a real gap our Playwright suite exposed when ::details-content accordions and range slider thumbs still animated under reduced motion emulation!

Even subtler: putting an unknown browser-prefixed pseudo-element inside a comma-separated selector list invalidates the entire rule in CSS. You must isolate each special pseudo-element in its own rule block, as src/styles/haze.css does:

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after, ::backdrop {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  ::details-content {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  ::-webkit-slider-thumb {
    transition-duration: 0.01ms !important;
  }
  ::-moz-range-thumb {
    transition-duration: 0.01ms !important;
  }
}

Our end-to-end tests verify this programmatically with page.emulateMedia({ reducedMotion: "reduce" }), asserting that document.getAnimations() reports 0 running animations and 0 transitions exceeding 10 ms across every computed element.

Check Notification Stack, Hold to Confirm, and Motion docs to explore these timing curves live, or read Native HTML Overlays in Production to pair these rules with transition-discrete.

Frequently asked questions

Why does Haze UI forbid transition-all across every component?

transition-all forces the browser to watch and animate unrelated layout properties like width, padding, or font metrics when state or themes toggle, producing layout jitter and slow repaints. Naming exact GPU-friendly properties like transition-colors or transition-[opacity,scale,translate] keeps every transition crisp.

Why do menu items use a 75 ms hover transition when buttons use 150 ms?

When a user sweeps a pointer down a vertical dropdown menu or command list, a 150 ms fade smears across multiple rows behind the cursor. Dropping menu highlight transitions to 75 ms keeps selection instantaneous with the mouse.

Which CSS pseudo-elements require separate prefers-reduced-motion rules?

A single wildcard rule like *, ::before, ::after misses ::details-content (disclosure height panels), ::-webkit-slider-thumb, and ::-moz-range-thumb. Put each pseudo-element in its own rule block so one unrecognized selector never voids the rest of the reset.

How does Haze UI enforce its motion vocabulary automatically?

Running pnpm check:vocab parses all 371 component and block source files, compiles every utility against src/styles/haze.css, and rejects out-of-vocabulary shadows, easings, animations, or transition-all usages.

Components & blocks mentioned

Browse all entries
  • Native modal with a title, description, body, and footer actions.

    npx shadcn@latest add @haze/dialog
  • Modal panel that slides in from the right, left or bottom edge, with a header, scrolling body and footer, and swipe to dismiss.

    npx shadcn@latest add @haze/drawer
  • Button that opens a short list of links, with group headings, leading icons, trailing hints, a destructive style and one level of submenus.

    npx shadcn@latest add @haze/dropdown-menu
  • Tab list switching panels horizontally or vertically in pill or underline style, with sizing, badges, and in-page link fallback.

    npx shadcn@latest add @haze/tabs
  • List of expandable items built from an array, in three variants, with a chevron or plus icon and optional single-open behavior.

    npx shadcn@latest add @haze/accordion
  • Dismissible updates with a layered stack and swipe dismissal. A promise row morphs from spinner to success or error.

    npx shadcn@latest add @haze/notification-stack
  • Fills as a confirmation is held, then changes to a check. Includes a standard two-step button.

    npx shadcn@latest add @haze/hold-to-confirm

Start with one component

Try it on its page, then install it with one command.