Motion
Spring recipes, timing curves, travel, and accessible overrides.
The motion tokens are Arc's: its springs, curves, durations, stagger steps and blur radii. Presets map them onto each motion family.
Choose a preset for a coherent starting point. Use motionOptions to tune individual transitions without replacing the component's interaction behavior. Motion remains a package dependency; the library owns the typed configuration and how it applies to the menu.
Explore theme and motion together in the Design Playground.
Presets
| Preset | Popup | Pointer highlight | Label / chevron |
|---|---|---|---|
none | Immediate | Immediate | Immediate |
subtle | 160 ms tween on the enter curve, scale 0.97, travel 5 px | 90 ms | 120 / 140 ms |
expressive | The morph spring; scale 0.94, travel 5 px | 180 ms | 120 / 140 ms |
motion="none" disables animation even when overrides are present. Preset changes keep explicit overrides; remove motionOptions to return to the new preset's defaults.
Springs
Shared spring recipes are exported as motionTokens.spring. Each is a valid motionOptions.transition value. Arc defines snappy, smooth and morph by visual duration and bounce; they are converted to stiffness and damping with Motion's own formula, so the physics are identical.
| Recipe | Arc definition | Stiffness | Damping | Use |
|---|---|---|---|---|
snappy | 0.26 s, bounce 0.12 | 405.556 | 35.444 | Presses, toggles, thumbs, chevrons, small indicators |
smooth | 0.4 s, bounce 0 | 171.347 | 26.18 | Panels, height and layout; never overshoots |
morph | 0.42 s, bounce 0.16 | 155.417 | 20.944 | Shared highlights, shape and width morphs |
responsive | stiffness 520, damping 38 | 520 | 38 | Quick direct response |
gentle | stiffness 340, damping 34 | 340 | 34 | Slower, calmer movement |
Every recipe has mass 1.
import { DropdownMenu, motionTokens } from '@uthereal/ui/dropdown-menu'
;<DropdownMenu
items={items}
motionOptions={{ transition: motionTokens.spring.smooth }}
/>For your own spring, provide type: 'spring' and any of stiffness, damping, or mass. Unspecified spring fields use morph defaults. A spring is physics-based; it does not accept a tween duration or easing curve.
Easing and duration
All public duration options use milliseconds. Motion itself expects seconds for tweens; the component converts at the rendering boundary.
motionTokens.duration provides Arc's instant: 120, fast: 160, exit: 180, standard: 240, considered: 480, and spring: 580 (the settle time of the CSS spring curve). motionTokens.easing names Arc's curves: enter (cubic-bezier(.16, 1, .3, 1)), standard (.22, 1, .36, 1), exit (.7, 0, .84, 0) and inOut (.65, 0, .35, 1), with their control points in motionTokens.bezier. linear, easeIn, easeOut and easeInOut remain available.
Exits follow Arc: a tween on the standard curve that is never longer than the entrance and at most 160 ms. motionTokens.stagger (char 16, word 40, line 80, item 35 ms) and motionTokens.blur (2, 4 and 8 px) hold Arc's stagger steps and swap blur radii; motionTokens.press holds its width-dependent press scales (0.96 up to 48 px wide, 0.985 above 220 px, 0.97 between).
<DropdownMenu
items={items}
motionOptions={{
transition: {
type: 'tween',
duration: motionTokens.duration.standard,
ease: motionTokens.easing.enter,
},
enter: { opacity: 0, scale: 0.97, offset: 8 },
exit: { opacity: 0, scale: 0.99, offset: 3 },
highlightDuration: 100,
labelDuration: 120,
chevronDuration: 180,
}}
/>The popup settles at opacity 1, scale 1, and zero travel. Enter/exit offsets are positive distances toward the trigger, on the axis of the actual placement. Submenus and collision-flipped menus therefore travel in the appropriate direction. transition controls both entrance and exit; there is no looping or delay option.
Option reference
Generated from the schema. Defaults below use subtle; spring-only fields show the fallback spring values. Numeric geometry uses pixels, rotation uses degrees, opacity and scale are unitless. A zero duration or offset is preserved.
| Option | Default | Values / purpose |
|---|---|---|
transition.type | tween | tween / spring Duration-based tween transition |
transition.duration | 160 | 0–2000 Milliseconds; zero is immediate |
transition.ease | enter | enter / exit / standard / inOut / linear / easeIn / easeOut / easeInOut Timing curve |
transition.stiffness | 155.417 | 1–1000 Spring stiffness |
transition.damping | 20.944 | 1–100 Resistance to oscillation |
transition.mass | 1 | 0.1–10 Simulated mass |
enter.opacity | 0 | 0–1 Starting or ending opacity |
enter.scale | 0.97 | 0.5–1.2 Starting or ending scale |
enter.offset | 5 | 0–40 Travel toward the trigger, px; follows actual placement |
exit.opacity | 0 | 0–1 Starting or ending opacity |
exit.scale | 0.985 | 0.5–1.2 Starting or ending scale |
exit.offset | 2.5 | 0–40 Travel toward the trigger, px; follows actual placement |
highlightDuration | 0 | 0–2000 Pointer highlight travel, ms; omitted, it glides on the snappy spring. Keyboard is always immediate |
stagger | 35 | 0–2000 Delay between rows as the popup opens, ms (Arc 35) |
labelDuration | 240 | 0–2000 Trigger text transition, ms |
labelOffset | 4 | 0–24 Trigger text travel, px |
chevronDuration | 580 | 0–2000 Chevron rotation, ms |
chevronRotation | 180 | -360–360 Open chevron angle, degrees |
chevronEase | spring | enter / exit / standard / inOut / linear / easeIn / easeOut / easeInOut Chevron timing curve |
Reduced motion and input
The component watches the device's prefers-reduced-motion setting, including changes while mounted. Reduced motion removes popup travel, label transitions, pointer-highlight movement, and chevron animation, regardless of the preset or supplied overrides. Focus, state changes, and action feedback remain available. Following Arc, presence may keep a short opacity crossfade (120 ms, no travel, scale or blur) under reduced motion; the resolved popup and modal motion expose it as fade.
Keyboard navigation always updates its highlight immediately. Timing overrides apply to pointer movement; repeated arrow presses never wait for an animation. Avoid using motion alone to communicate a result.
Interruptions and live edits
Motion handles interrupted transitions. Closing makes the exiting popup inert immediately; an animation never delays an action or leaves a closing menu interactive. Changing design or motion arguments preserves a mounted menu's selections and IDs. Changing entrance settings is easiest to compare by reopening the menu.
Use a DropdownPreset to share motion and motionOptions across an application. Nested fields merge; changing transition.type replaces its old variant, so tween settings cannot leak into a spring. Agents use the same options and validation rules; see Building with agents.