Motion

Glass gives to 0.99 in 50ms and comes back in 200ms; an overlay comes from the control that opened it; nothing springs.

Rules

  1. motion-press MUST Answer a press on glass with its own motion: scale to --scale-press-glass (0.99) in --dur-glass-press (50ms), the sheen gone and the centre darker, and back in --dur-glass-release (200ms); a flat control scales to --scale-press (0.97) in --dur-press (120ms). Because the press is Glaze's signature motion, and a control that answers on its own curve feels like a different product.
    • Correct: <Button>Join</Button>
    • Wrong: active:scale-90 transition-transform duration-300
  2. motion-overlay MUST Bring an overlay in with overlay-motion: anchored, it slides --overlay-shift from its trigger's side; modal, it settles from --scale-overlay; it leaves the same way on --dur-state. Because the 4px says which control opened it and the 0.97 says a dialog sits above the page; one recipe keeps every overlay on the same path.
    • Correct: className={cn(overlaySurface, overlayMotion)}
    • Wrong: data-starting-style:scale-50 data-starting-style:opacity-0
  3. motion-no-springs NEVER Use a spring, a bounce or an overshoot; every move eases out and stops. Because an overshoot makes a 120ms press read as a toy and delays the moment the control settles; at these lengths a damped spring lands where the ease-out does.
    • Correct: transition-timing-function: var(--ease-out)
    • Wrong: transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1)
  4. motion-durations MUST Take every duration from --dur-press, --dur-state, --dur-overlay, --dur-slide, --dur-spin or --dur-sweep. Because reduced motion zeroes the tokens, and a typed duration keeps moving for people who asked it to stop.
    • Correct: duration-(--dur-state)
    • Wrong: duration-[250ms]
  5. motion-name-properties NEVER Write transition-all; name the properties: colour, opacity, scale, translate. Because transition-all also tweens width and padding, so a hover shifts the layout around it.
    • Correct: className="transition-[background-color,scale]"
    • Wrong: className="transition-all"
  6. motion-one-loop NEVER Loop anything but the pending arc and an indeterminate Progress: no pulse, glow or bounce of your own. Because a loop pulls the eye from the one thing that changed, and the arc and the progress sweep are the only signs work is running.
    • Correct: <Button pending>Run eval</Button>
    • Wrong: <div className="animate-pulse bg-field"/>
  7. motion-reduced MUST Let prefers-reduced-motion zero the durations and the press scale; the arc stays as a still mark. Because scaling and fading make some people dizzy, and a still arc still says the button is working.

Tokens

TokenRoleUse forNot forLight
--dur-pressa press on a flat control: the scalea pressoverlays120ms
--dur-glass-pressglass going down: the scale and the layersglass active50ms
--dur-glass-releaseglass coming back upglass200ms
--dur-statea state change: hover, a field's line, a checkhover, a field line, a check; an overlay leavingpresses160ms
--dur-overlayan overlay in; it leaves on --dur-statean overlay arrivinghover200ms
--overlay-shifthow far an anchored overlay travels in from its trigger, and back outan anchored overlay coming in from its triggera dialog4px
--scale-overlaythe scale a modal overlay settles from and leaves toa dialog settling inanchored overlays, presses0.97
--dur-spinone turn of the pending arc, a loopbutton pending, spinner800ms
--dur-slidea selection mark sliding to its new place: the segmented thumb, the pill tabsegmented control, tabs200ms
--dur-sweepone pass of the indeterminate segment along a progress track, the other loopprogress indeterminate1400ms
--wait-showhow long a load waits before its skeleton or dim shows, so a fast answer never flashesskeleton swap150ms
--wait-holdhow long a skeleton stays once it shows, so it never blinksskeleton swap400ms
--stalethe opacity of content that is reloading behind a busy markskeleton swap0.6
--ease-outthe house curve: arrives fast, settlesevery transitioncubic-bezier(0.2, 0.8, 0.2, 1)
--ease-inan element leavingoverlay exitcubic-bezier(0.4, 0, 1, 1)
--scale-press-flatthe scale a held secondary settles at, barely movingsecondary button0.99
--scale-pressthe scale a held flat control settles ata held controloverlays0.97
--scale-press-glassthe scale held glass settles at, a slight giveglass0.99

Decision table

You needUse
Press: glass settles at --scale-press-glass in 50ms, the sheen goes and the dark centre deepens to --glass-core-held; it comes back in --dur-glass-release. A flat control settles at --scale-press in --dur-press--dur-glass-press, --ease-out
State: hover brightness, a field's line, a row wash; a tick wipes in from its start edge (tick-draw) and goes at once; an opened section's text fades in while its height cuts--dur-state, --ease-out
Overlay in: a menu, popover, select or tooltip fades in as it slides --overlay-shift (4px) from its trigger; a dialog fades in as it settles from --scale-overlay (0.97). One recipe, overlay-motion--dur-overlay, --ease-out
Overlay out: it leaves the way it came, faster--dur-state, --ease-in
Slide: a selection mark moves to the new choice: the segmented thumb, the pill tab's paper; the labels crossfade--dur-slide, --ease-out
Pending: the arc turns, a loop--dur-spin, linear
Indeterminate: a short glaze segment slides along a progress track, the other loop--dur-sweep, linear

Scale

Durations 50 (glass down), 120, 160 and 200ms (overlays, a sliding thumb), the arc 800ms a turn, the progress sweep 1400ms a pass. One curve out, one in. No springs. Overlays travel 4px or settle from 0.97.

Reject list

  • No springs, bounces or overshoot.
  • No transition-all.
  • No loops but the arc and the progress sweep.
  • No overlay that grows from nothing, and no dialog that slides.
  • No height that animates; a section's height cuts.
  • Elevation: No shadows: depth is drawn inside the shape, and overlays lift with a ring.