Skip to main content

Animation

Motion expresses presence and hierarchy — never celebration spam or urgency theater.


Duration tokens​

TokenValueUse
--jj-motion-duration-instant0msReduced-motion snaps; toggles with no need
--jj-motion-duration-micro120msHover, press feedback
--jj-motion-duration-fast160msIcon color, focus ring fade
--jj-motion-duration-standard200msPanels, disclosure, row settle
--jj-motion-duration-emphasis280msToast enter
--jj-motion-duration-slow320msRare emphasis ceiling
--jj-motion-duration-pulse2400msSoft status breath loop

Exit animations use the same or shorter token as enter (prefer --jj-motion-duration-fast / micro).


Easing tokens​

TokenValueUse
--jj-motion-ease-outcubic-bezier(0.16, 1, 0.3, 1)Enter, hover
--jj-motion-ease-in-outcubic-bezier(0.4, 0, 0.2, 1)Panels, layout
--jj-motion-ease-incubic-bezier(0.4, 0, 1, 1)Exit
--jj-motion-ease-linearlinearIndeterminate progress only

Forbidden: bounce, elastic, springy overshoot on productive surfaces.


Approved motion patterns​

Ship these app-wide (2–3 intentional patterns):

1. Status pulse (subtle)​

  • Target: Local LLM / agent ready badge
  • Property: opacity 0.85 → 1 or soft teal wash amplitude ≤ 8%
  • Duration: --jj-motion-duration-pulse
  • Loop: yes, very quiet
  • Reduced motion: static opacity 1

2. Row settle​

  • Target: new queue / application rows
  • From: translateY(-6px) + opacity 0
  • To: identity
  • Duration: --jj-motion-duration-standard
  • Easing: ease-out
  • Reduced motion: opacity-only ≤ 100ms or snap

3. Toast rise​

  • Target: toasts
  • From: translateY(8px) + opacity 0
  • Duration: --jj-motion-duration-emphasis
  • Auto-dismiss: success/info ~4–6s; errors persist
  • Reduced motion: fade only or snap

Interaction feedback​

InteractionMotion
Button hoverColor/background ≤ micro; no scale pop
Button pressOptional opacity 0.92 micro
ToggleThumb travel standard; color ease-out
Modal openFade + 4px rise; no full-screen zoom
SkeletonSoft opacity pulse ≤ pulse token; prefer static muted block under reduced motion

Disallowed​

  • Confetti, fireworks, full-screen flashes
  • Attention-looping on idle (except status pulse)
  • Parallax dashboards
  • Motion-only meaning (state must exist in text/icon)
  • Stagger cascades longer than ~200ms total for list mounts

Reduced motion​

When prefers-reduced-motion: reduce (or OS equivalent):

Instead ofUse
Translate entersOpacity ≤ 100ms or snap
Pulse loopsStatic
Progress indeterminate animationStatic bar + text status

Token: components should read --jj-motion-reduce: 1 (set by theme/media) and branch.

See ACCESSIBILITY.md.