Motion

State changes answer in 60 to 180ms on one standard ease.

Rules

  1. motion-quartzs-snap MUST Change a quartz with a cut or a short ease on --ease-step (cubic-bezier(0.2, 0, 0, 1)); nothing glides. Because a status that fades from running to failed shows a half state an operator can misread, and a slow ease makes the change look late.
    • Correct: <Status status={status}/>
    • Wrong: <Status status={status} className="transition-all duration-700"/>
  2. motion-declare-transitions MUST Give every interactive element a transition: color, background and outline over --dur-fast. Because transition: all also tweens width and padding, which shifts layout on hover, and an element with none cuts while its neighbour tweens.
    • Correct: transition: color var(--dur-fast), background-color var(--dur-fast)
    • Wrong: transition: all
  3. motion-hue-cuts NEVER Ease a hue change; border and wash changes may ease. Because mid-tween the color passes through other kinds, so cyan easing to orchid shows the run blue for a moment.
    • Correct: <Badge kind={kind}/>
    • Wrong: <Badge kind={kind} className="transition-colors duration-300"/>
  4. motion-one-thing NEVER Animate for its own sake: no parallax or looping decoration. The running arc and an indeterminate bar are the only loops. Because motion pulls the eye, and a looping decoration takes it from the one row that changed.
    • Correct: <Status status="running"/>
    • Wrong: <Badge kind="agent" className="animate-bounce">Live</Badge>
  5. motion-running-arc MUST Show running work as the 3/4 arc before the word, turning smoothly once per --dur-spin. Because the arc stops but stays under reduced motion and pauses offscreen, which a hand-made spinner does not.
    • Correct: <Status status="running"/>
    • Wrong: <span className="animate-spin">...</span> Running
  6. motion-no-grow NEVER Grow or scale an overlay in; it appears. Because a grow pulls the eye to the motion instead of the content and makes a fast menu feel slow.
    • Correct: <PopoverContent/>
    • Wrong: <PopoverContent className="data-starting-style:scale-95"/>
  7. motion-collapse-cuts MUST Open and close a panel with a cut; never tween its height. Because a height tween reflows everything below it for 200ms, and the content arrives after the person already looked.
    • Correct: <CollapsibleContent/>
    • Wrong: <CollapsiblePanel className="transition-[height]"/>
  8. motion-reduced MUST Honour prefers-reduced-motion: base and slow durations and the sheet shift go to zero, loops stop; hover colour stays. Because sliding sheets and loops can make people with vestibular disorders sick, while a 60ms press still tells them the click landed.
    • Correct: motion-safe:animate-run
  9. motion-pause-offscreen SHOULD Pause any loop while it is offscreen. Because a loop nobody can see still costs frames and battery.

Tokens

TokenRoleUse forNot forLightDark (blank: same as light)
--dur-presspress feedbackpress feedbackhover60ms
--dur-fasthover: color, wash and edge changes on every interactive element, and a menu, popover or tooltip leaving, on --ease-stephover color, wash and edge changes, and an overlay leavingdialogs120ms
--dur-basemenus, popovers, selects, tooltips and toasts in, opacity only; they leave on the shorter --dur-fastmenus, popovers, tooltips and toasts inhover160ms
--dur-slowdialogs and sheets: opacity, plus --sheet-shift for a sheetdialogs and sheetsmenus180ms
--dur-spinone turn of a pending ring (--ease-spin)one turn of a pending ringhover800ms
--dur-runone turn of the running status arc (animate-run)one turn of the running status archover1000ms
--dur-slideone pass of the indeterminate progress segment (animate-slide)one pass of the indeterminate progress segmenthover1200ms
--ease-spinthe pending ring turns smoothlythe pending ring, turning smoothlystate changeslinear
--thumb-lifthow much ink the selected segment takes beyond paper; the dark theme raises itsurface-thumb0%20%
--thumb-ring-alphathe ink alpha of the selected segment's 1px ring; the dark theme raises itelev-thumb00.16
--skeleton-stephow much ink the skeleton fill takes beyond the grey field; the dark theme raises itskeleton0%8%
--dur-skeleton-delaywait before a skeleton shows, so fast loads never flash oneskeleton swap150ms
--dur-skeleton-holdshortest time a shown skeleton stays, so it never blinksskeleton swap400ms
--toast-read-basereading time every toast getstoast3000ms
--toast-read-charreading time per character of title and descriptiontoast60ms
--toast-read-actionextra time when the toast carries an actiontoast3000ms
--toast-read-minshortest a toast staystoast4000ms
--toast-read-maxlongest a toast stays before it waits for the persontoast12000ms
--scale-pressthe scale a pressed button or chip settles atpressed chip or tileoverlays0.98
--ease-stepthe standard curve for every state change: hover, press, chip toggle, row select, tab switchthe standard ease for every state change and every overlay; it eases out, it does not snaploopscubic-bezier(0.2, 0, 0, 1)
--sheet-shifthow far a sheet travels from its edge as it appearshow far a sheet travels inmenus8px
--surface-skeletonthe skeleton fill: the grey field, one step stronger in the dark themeskeleton boxcolor-mix(in oklch, oklch(var(--grey-c)), oklch(var(--ink-c)) var(--skeleton-step))
--stale-opacitycontent that is reloading, still shown and still readable, 5:1 of ink at 60%skeleton swap region while it reloads0.6
--dim-opacitycontent set aside while something else is the point: a muted legend entry, a dimmed series, a tool row in shell mode, a disabled thumbnail, a disabled primary keychart legend, chart series, prompt input, attachment0.4

Decision table

You needUse
Hover: color, wash and edge on every interactive element--dur-fast, --ease-step
Press: a button or chip settles at --scale-press--dur-press, --ease-step
Enter: a menu, popover, select, tooltip or toast appears: opacity only, it never grows--dur-base, --ease-step
Exit: any overlay leaves faster than it came--dur-fast, --ease-step
Overlay: a dialog appears; a sheet adds an 8px slide (--sheet-shift) from its edge; the backdrop fades--dur-slow, --ease-step
Collapse: panels open and close with a cut; no height moves0ms, --ease-step
Running: the status arc turns--dur-spin, --ease-spin
Hover or focus color--dur-fast
A hue or status changeno transition, a cut

Scale

Durations: 0, 60, 120, 160, 180ms, all on --ease-step. Spin: 800ms a turn, linear.

Reject list

  • No decorative loops.
  • No transition: all.
  • No eased hue swaps.
  • No overlay that grows.
  • No height tweens.
  • Elevation: Everything is flat, and only overlays get a shadow.
  • Color: Five hues name the kind of thing, and amber and red mean trouble.