Foundation
Motion & Transitions
Motion confirms, locates and explains. It never asks for attention on behalf of a form, and it is never the only way to understand a state.
Principles
- Give motion a job: feedback, spatial continuity, or explaining a change.
- Restraint is the default. A public-service form should feel certain, not playful.
- Fast and interruptible beats smooth and staged for anything used repeatedly.
- Do not animate a status change. A confirmation should read as final the moment it appears.
- Reduced motion removes movement, not meaning: opacity and color cues remain.
Timing tokens
The shared spring object is the source for Motion components. Each tier carries its own exit duration so deferred unmounts stay in step with the animation.
| Tier | Enter | Exit | Bounce | Typical use |
|---|---|---|---|---|
| fast | 80ms | 60ms | 0 | Highlights, selection fills, active pills |
| moderate | 160ms | 120ms | 0 | Popovers, panels, small reveals |
| slow | 240ms | 160ms | 0.12 | Rare, deliberate accents such as a drag settle |
CSS transitions use an explicit 180ms guard on border-radius, background-color, color, border-color, fill and strokewhen the shape or appearance changes. Hover and press feedback stay in the 100–160ms range. Keep UI motion under 300ms.
Behaviors
- Enter and exit use
AnimatePresence. Entrances are slightly stronger than exits; neither starts from zero scale. - Continuity uses shared layout IDs, such as the sliding pill in the navigation, so the same object appears to move between places.
- Press feedback compresses a button by one pixel or scales it to 0.96. It never shifts surrounding layout.
- Reveal animates height or opacity in
Accordion; aBannercollapses its height on dismiss instead of unmounting abruptly. - Crossfades between two strings can use a 2px blur so the eye reads one change rather than two objects.
- Stagger is 30–80ms between related rows when several enter together.
Overlays and loading
Overlays and loading states compose the tiers above; they do not invent a new timing language. Dialog enters and exits its backdrop and panel with spring.slow. A close holds the portal mounted until the exit finishes, with a fallback timer derived from the tier's exit duration. That is why a dialog never snaps shut when the tab is throttled.
spring.moderate is critically damped: it lands without overshoot. The tier is intended for short travel and panels that must settle precisely. Popover stays lighter, using a short CSS opacity and transform transition rather than a spring. A future drawer or sheet should start from moderate, not from a new motion primitive.
Loading motion describes real state. Skeleton pulses while the shape is known and stops under reduced motion. Progress moves its fill with a 300ms width transition, the upper bound of the UI range; an indeterminate bar pulses and stops under reduced motion. Banner composes tiers for its height collapse instead of adding a separate timing value. None of these states should be faked to imply speed, and a loading delay is not a reason to add a splash screen to an informational page.
Appropriate and inappropriate
- Animate a panel opening from its trigger; do not scale a popover from the viewport center.
- Animate a list reflow after a sort; do not animate every row of a table during scroll.
- Animate a confirmation of a rare, significant action; do not celebrate a routine submission.
- Do not animate command palette open or close, keyboard shortcuts, or anything used hundreds of times a day.
- Do not use a spring for a status that must read as committed.
Reduced motion
The root MotionConfig is set to reducedMotion="user", so transform and layout animations drop out when the operating system asks for less motion. CSS keeps opacity and color transitions and removes movement from the marquee. A component that starts a transform animation must check useReducedMotion() itself and keep only the fade.
Try it
Replay a reveal or a text swap. The demo uses the moderate spring and reads the reduced motion setting from your device.
Related
See Accordion, Banner, Progress, Skeleton and Scroll Area for motion in components, States & Feedback for when a state should simply appear, and the PhilSys motion delta for a system that deliberately uses less of it.