Skip to main content

tokens

Motion

Duration and easing tokens shared by CSS transitions and the GSAP choreography, with each curve plotted against the GSAP ease it runs as, and the choreography-only token groups.

The authority is js/choreography/tokens/motion/motion.js, which the GSAP choreography imports. npm run build:motion mirrors it to styles/motion.css, so CSS transitions can use the same values as duration-* and ease-*. Figma can't express an easing curve, which is why motion stays in code.

GSAP can't read a cubic-bezier() curve, so the choreography never passes it one. motion.ease(name) returns the nearest GSAP ease instead, from GSAP_EASE in js/choreography/config/ix/motion.js, and each curve below shows that GSAP ease dashed over the designed curve. The match is closest at the end of the motion, where the eye judges an ease. standard and emphasis lose their slow start, because GSAP has no curve shaped like it. A new ease token needs a GSAP_EASE entry, and npm test fails until it has one. ADR 0004 in specs/decisions/ records the decision.

The scale has no 200ms step, so moving a transition off Tailwind's duration-200 changes its timing. Every transition needs a reduced-motion path: put it behind motion-safe:, as the demos below do.

Duration

  • duration-instant 167ms
  • duration-fast 312ms
  • duration-base 460ms
  • duration-slow 660ms
  • duration-slower 1000ms

Bars are to scale against 1000ms. Each dot uses ease-standard.

Easing

  • ease-standard cubic-bezier(0.4, 0.0, 0.2, 1) GSAP: power1.out
  • ease-enter cubic-bezier(0.0, 0.0, 0.2, 1) GSAP: power2.out
  • ease-exit cubic-bezier(0.4, 0.0, 1, 1) GSAP: sine.in
  • ease-emphasis cubic-bezier(0.3, 0.0, 0.2, 1.1) GSAP: power2.out
  • ease-springy cubic-bezier(0.2, 0.8, 0.2, 1.4) GSAP: back.out(2)

The solid curve and upper dot are the token as CSS runs it. The dashed curve and lower dot are the GSAP ease the choreography runs for it. Each dot runs for duration-slow. With reduced motion on, the dots jump instead of travelling.

Choreography-only tokens

These groups exist only in the choreography and aren't mirrored to CSS, so there is no utility for them.

Distance

TokenValue
xs4px
sm8px
md16px
lg24px
xl40px

Stagger

TokenValue
none0s
tight0.05s
base0.1s
loose0.12s

Opacity

TokenValue
zero0
subtle0.05
low0.15
mid0.5
high0.85
full1

Blur

TokenValue
none0px
xs2px
sm4px
md8px
lg16px
xl32px

Layer order

TokenValue
base0
content10
overlay20
modal30
toast40