Skip to Content
Getting startedFoundationsComponentsPackagesTools

Motion

Ten roles and three modes, played here, with a cap on every duration.

A component does not choose a duration. It chooses a role, and the role carries a duration, an easing, and where relevant an offset and a scale, in whichever of the three motion modes is set.

RoleDefaultExpressiveReduced
pressA control answering a press.
Default
not setnot set
Expressive
not setnot set
Reduced
not setnot set
feedbackA state change the eye should catch: a check, a toggle.
Default
not setnot set
Expressive
not setnot set
Reduced
not setnot set
indicatorA marker moving between positions, as a tab underline does.
Default
not setnot set
Expressive
not setnot set
Reduced
not setnot set
highlightSomething drawing attention to itself where it already is.
Default
not setnot set
Expressive
not setnot set
Reduced
not setnot set
drawA mark drawing itself, as a tick does.
Default
not setnot set
Expressive
not setnot set
Reduced
not setnot set
layoutA layout settling after something is added or removed.
Default
not setnot set
Expressive
not setnot set
Reduced
not setnot set
popover-enterA popover or a menu arriving.
Default
not setnot set
Expressive
not setnot set
Reduced
not setnot set
dialog-enterA modal arriving over a backdrop.
Default
not setnot set
Expressive
not setnot set
Reduced
not setnot set
sheet-enterA drawer coming in from an edge.
Default
not setnot set
Expressive
not setnot set
Reduced
not setnot set
toast-enterA toast arriving at the corner.
Default
not setnot set
Expressive
not setnot set
Reduced
not setnot set

Three modes, not a switch

subtle is the default and is what an interface should feel like. expressive is the same vocabulary with more travel, for a product that wants it. reduced is what a reader who has asked their system for less motion gets: durations under a ceiling, no travel, no scale, and nothing that moves for its own sake.

Reduced is a mode in the token layer rather than a media query in each component, which is why it cannot be forgotten in one component and remembered in another.

The caps

Every role's duration is capped, and the cap is tested: @hipuku/motion holds each value inside its ceiling, and a contract story checks that every animating component runs its role's duration in every mode, that staggered delays stay inside the stagger maximum, and that reduced is both under its ceiling and still.

That is the part a design system can actually guarantee. A component cannot promise to feel right; it can promise never to take 600ms to answer a click, and never to ignore a reduced-motion setting.

On this page