Motion

Motion explains a change: four durations, three curves, and nothing moves under reduced motion.

Rules

Motion explains a change; it never decorates one. Something moves because it entered, left, moved or responded, and the motion shows where it came from and where it went. Nothing moves on its own except a loading indicator and a designated ambient canvas (Motion canvas below).

Duration scale: four steps

StepWebUse
150msduration-150Color and opacity on small controls: a pressed button, a toggled chip
200msduration-200Inputs and hover: focus ring, field border, row highlight
300msduration-300 (the default)Surfaces: a dialog or sheet opening, the sidebar drawer, media scaling inside a card on hover
500msduration-500Large reveals: a page-level section or a hero entering
  • The default is 300ms. Pick a step from the table; a value off the scale (duration-[250ms], duration-700 on a control) needs a reason written beside it.
  • Leaving is faster than entering. A dismissed surface uses the step below the one it opened with, so the interface never waits on its own exit.
  • Longer than 500ms is ambient only: marquee, skeleton shimmer, a progress meter filling to its value. Never for something the person is waiting to use. The one exception is a tour's camera move (Guides), which the person asked for by pressing Next.

Easing: three curves

CurveWebUse
Ease outease-out (the default)Anything entering or responding to input: it starts fast and settles
Ease in and outease-in-outSomething moving between two resting places: a drawer, a sheet, a tab indicator
Linearease-linearContinuous loops only: a spinner, a marquee

Bare ease-in is not used for interface motion: it starts slowly, which reads as lag.

A marker arriving on a map

A pin or marker that was not on the map a moment ago fades and scales up from its own anchor; one already there does not move. A map admits a whole class of markers at once when the view crosses a zoom threshold, and a batch appearing at full size in one frame reads as the map flinching rather than as markers arriving.

  • The small-control steps, not the surface ones: 150ms, ease-out. Sixty markers entering together on a surface step reads as sluggish, and a marker is a 28px control, not a panel.
  • It grows out of its point. transform-origin sits at the marker's anchor (bottom for a pin), so it never slides off the place it is marking.
  • Only what is new animates. Keyed by the marker's own id, an existing marker keeps its node and stays still; nothing compares the previous set.
  • Reduced motion shows the marker in place.

Web: map-marker-enter. Native: unbuilt, and the same four rules bind it when a map surface ships there.

Auto-advancing content (carousels, rotating heroes)

Anything that advances on its own for longer than 5 seconds carries a way to stop it (WCAG 2.2.2 Pause, Stop, Hide). One rule, every platform:

  1. A visible pause / play control beside the slide indicators, 44pt target, labelled with what a press does ("Pause slideshow" / "Play slideshow"). It holds until pressed again. While it plays, a ring round its icon fills over the slide's own dwell, so a reader sees when the next turn comes: it stands still whenever the slide is held, starts over on every turn, is absent while paused and under reduced motion, carries no name of its own, and its arc holds 3:1 against its track and both grounds.
  2. It holds while the reader is engaged: pointer over it, focus anywhere inside it (keyboard or switch access), a screen reader running (VoiceOver / TalkBack on native), and for a few seconds after any manual navigation.
  3. It never moves under reduced motion or in a hidden tab / backgrounded app.
  4. Each slide names its place: "N of M" for assistive technology (web: role="group" + aria-roledescription="slide" + aria-label; the container aria-roledescription="carousel"). Indicators that are focusable are never inside an aria-hidden region.
  5. Every slide has a dwell; none holds forever. Cadence 5s per ad slide, cooldown 4s after interaction. A first-party lead slide may stay longer (the www home's tarot card: 10s, 15s while it waits on the reader's draw), and the next slide always comes in from the right. A slide that holds until the reader acts stops the carousel for every reader who never does: the tarot hold froze the home banner. Web: slideDwellMs (@yroun/util, L1).
  6. The inactive indicators read at 3:1 (WCAG 1.4.11): they carry state, so they are text-secondary at full strength (3.81:1 on the light page ground, 7.76:1 dark), the same foreground-token rule as the scrollbar thumb; never a border token or a translucent fill. The active one stays brand blue. Android's border token was 1.00:1 and web/iOS muted-foreground/30 1.40:1 light, 1.68:1 dark, all fails.
  7. A loop loops for every input: swipe, arrows, dots and the timer alike; a swipe that stops at the last slide while the arrows wrap is a broken loop. Where a slide is too short for edge arrows to miss its content or controls, prev / next go in the control row (pause, prev, dots, next), and a carousel without one gets one; the www banner's edge arrows covered its badge and call to action. Web: loop-rail (@yroun/util, L1).
  8. A turning list's pause shares the pager row, never a row of its own. Under the list, one control row: pause at the left end, prev, "n / m" and next at the right; on a narrow screen at large text it wraps with the pause first. DOM order is visual order, list then controls; the list's description says it turns on its own and that the controls are below it, in words the controls' own labels contain, so a listener can find them by ear. A reader's prev or next stops that list's timer for the visit. Web: AutoTurningPager.

Web: the decision is the pure shouldAutoAdvance (@yroun/util, L1), the dwell a frame clock that runs only while it allows (stepDwell, L1), the control is AutoplayToggle with its ring, and useHeroAutoplay wires all three; a carousel that keeps its own loop calls shouldAutoAdvance rather than restating the conditions. Native follows the same five points.

Typed reveal

Text that should feel written in front of the reader (the www /about headline, a fresh tarot reading) is revealed by TypewriterText from @yroun/ui, the one implementation. It types like a person: a word in one quick burst, a beat at each space, a longer one after a comma, the longest after a sentence or a line break, with a little jitter so it never ticks like a clock. The rhythm is the pure typewriterDelayAfter (L1, typewriter-rhythm.ts); a caller tunes only speed (a multiplier) or single beats, never writes its own timer.

  1. Only fresh content types. A result produced this visit types once; the same content reopened later (a journal entry, a revisit) shows whole (animate={false}). Text that changes after typing began lands whole.
  2. Reading time is a ceiling. A long body raises speed so it finishes in a few seconds (the tarot reading types at 2.5, about 6s for 180 Korean characters); a reader never waits on the animation to read.
  3. Reduced motion shows the whole text at once.
  4. The text exists once, whole, from the first paint. The part not yet typed is transparent, never hidden: it holds the layout so nothing shifts, screen readers and crawlers read the sentence whole, and a copy returns it once. No sr-only twin and no aria-hidden overlay: that pair pasted the /about headline twice.

Platforms

PlatformDefaultRule
Webtransition-* duration-300 ease-outEntrance and exit animations are real transitions or framer-motion; a class that generates no CSS is not motion
iOS.snappy(duration: 0.25, extraBounce: 0) for controls; .spring(response: 0.32, dampingFraction: 0.88) for surfacesSystem presentation (sheets, alerts, navigation) keeps its own motion
AndroidMaterial 3 motion defaults (tween/spring from Compose)System presentation keeps its own motion

Reduced motion

  • Every non-essential animation stops under reduced motion: prefers-reduced-motion on the web (useReducedMotion() or motion-safe:), Reduce Motion on iOS (accessibilityReduceMotion), animator duration scale 0 on Android.
  • A moving surface becomes a cross-fade or an instant change; a loop stops on a still frame; a skeleton stays at rest.
  • Motion never carries meaning on its own: a state it announces is also stated in text, icon or color.

Motion canvas: decorative and waiting motion

Abstracted from reviewing thinking-orbs (Jakub Antalik, MIT), the reference for "free, but inside a flow" dots in Apple's setup screens. Motion that runs on its own (a brand background, an AI waiting state) is cheap by construction:

  1. Plain 2D canvas. No WebGL, no ctx.filter, no SVG filters: the same pixels in every browser, cheap on low-end phones. Device pixel ratio capped at 2.
  2. It stops when nobody sees it. Paused offscreen (IntersectionObserver) and in a hidden tab; instances share one clock and resume in phase.
  3. Reduced motion gets a still frame, never an empty box.
  4. Ink from the page: currentColor or the page theme, never a color literal in the canvas code.
  5. One component per job: the brand surface is BrandDotsCanvas; an AI waiting state is ThinkingIndicator (our own engine: while queued and at rest, dots roaming freely inside a ball, each around its own home on its own slow rhythm, joined by lines that form and fade with distance, the cloud turning slowly and moving continuously; a swirling cloud while an answer is written; phase from the server task status, never a timer; still on error and under reduced motion). A new moving surface extends one of them before it adds a third.

Live specimens

Reduce motion is on, so the boxes jump instead of travel, as every surface does under this setting.

Four durationsPress Play: each box travels with its step on ease-out.
  • duration-150Pressed button, toggled chip

  • duration-200Focus ring, hover, field border

  • duration-300Surfaces: the default

  • duration-500Large reveals

Three curvesEase out enters or responds, ease in and out moves between two rests, linear only loops.
  • ease-out
  • ease-in-out
  • ease-linear