UI

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

PresetPopupPointer highlightLabel / chevron
noneImmediateImmediateImmediate
subtle160 ms tween on the enter curve, scale 0.97, travel 5 px90 ms120 / 140 ms
expressiveThe morph spring; scale 0.94, travel 5 px180 ms120 / 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.

RecipeArc definitionStiffnessDampingUse
snappy0.26 s, bounce 0.12405.55635.444Presses, toggles, thumbs, chevrons, small indicators
smooth0.4 s, bounce 0171.34726.18Panels, height and layout; never overshoots
morph0.42 s, bounce 0.16155.41720.944Shared highlights, shape and width morphs
responsivestiffness 520, damping 3852038Quick direct response
gentlestiffness 340, damping 3434034Slower, 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.

OptionDefaultValues / purpose
transition.typetweentween / spring
Duration-based tween transition
transition.duration1600–2000
Milliseconds; zero is immediate
transition.easeenterenter / exit / standard / inOut / linear / easeIn / easeOut / easeInOut
Timing curve
transition.stiffness155.4171–1000
Spring stiffness
transition.damping20.9441–100
Resistance to oscillation
transition.mass10.1–10
Simulated mass
enter.opacity00–1
Starting or ending opacity
enter.scale0.970.5–1.2
Starting or ending scale
enter.offset50–40
Travel toward the trigger, px; follows actual placement
exit.opacity00–1
Starting or ending opacity
exit.scale0.9850.5–1.2
Starting or ending scale
exit.offset2.50–40
Travel toward the trigger, px; follows actual placement
highlightDuration00–2000
Pointer highlight travel, ms; omitted, it glides on the snappy spring. Keyboard is always immediate
stagger350–2000
Delay between rows as the popup opens, ms (Arc 35)
labelDuration2400–2000
Trigger text transition, ms
labelOffset40–24
Trigger text travel, px
chevronDuration5800–2000
Chevron rotation, ms
chevronRotation180-360–360
Open chevron angle, degrees
chevronEasespringenter / 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.

On this page