Motion — Easing & Duration
Duration tokens (5) and easing curves (5) for every deterministic Koder UI animation. The "how long + what curve" half of Motion (physics, springs, and reduced-motion contract live in `physics.kmd`).
Spec — Motion: Easing & Duration
Facet *isual*do Koder Design. Material parity: https://m3.material.io/styles/motion/easing-and-duration/tokens-specs.
R1 — Duration tokens
| Token | ms | Use |
|---|---|---|
motion-instant |
0-50 | Focus ring, ripple onset, immediate ack |
motion-fast |
100-200 | Hover, switch toggle, button press |
motion-medium |
200-300 | Modal entry/exit, drawer slide |
motion-slow |
300-500 | Coordinated multi-element (FAB morph), page transition |
motion-long |
500-700 | Onboarding choreography, hero animation (landing only) |
Concrete defaults at material3 preset:
motion-instant: 50msmotion-fast: 150msmotion-medium: 250msmotion-slow: 400msmotion-long: 600ms
Per-preset variation: terminal_classic uses 0ms (no animation — matches CRT feel); cyberpunk_neon uses 1.2× durations (deliberate slower pulses); brutalist uses 0ms (intentional sharpness).
R2 — Easing tokens
| Token | Curve | Use |
|---|---|---|
ease-standard |
cubic-bezier(0.2, 0, 0, 1) | Default for on-screen change |
ease-decelerate |
cubic-bezier(0, 0, 0, 1) | Entering — element arriving |
ease-accelerate |
cubic-bezier(0.3, 0, 1, 1) | Exiting — element leaving |
ease-emphasize |
cubic-bezier(0.2, 0, 0, 1) (longer) | High-attention motion |
linear |
linear | Loaders, progress, looping motion |
Linear is the only allowed curve for indefinite motion (loaders); all discrete animations use one of the eased curves.
R3 — Decision tree
Property animated:
├── opacity / color → ease-standard (in), ease-accelerate (out)
├── position / scale (entering) → ease-decelerate
├── position / scale (exiting) → ease-accelerate
├── coordinated multi-element → ease-emphasize
└── indefinite progress → linearDuration picking:
├── State acknowledgment (focus, ripple) → motion-instant
├── Single property tween (hover, toggle) → motion-fast
├── Element entry/exit (modal, drawer) → motion-medium
├── Coordinated transition (FAB morph) → motion-slow
└── Hero choreography (landing only) → motion-longCross-link
motion.kmd— index over all Motion sub-specsmotion/physics.kmd— spring tokens, reduced-motion contractmotion/transitions.kmd— transition patterns using these tokensthemes/ui-style.kmd— per-preset motion variation