Motion
Current motion primitives — two easing variables from globals.css and Framer Motion infrastructure. No formal duration scale yet; values below are observed current usage, not official tokens. Respects prefers-reduced-motion.
Introduction#
Motion in DavinciUI is documentation-only in Phase 3. The system currently provides two CSS easing variables (--ease-out-strong and --ease-in-out-strong) and Framer Motion as the animation runtime. No --duration-* tokens exist yet — Phase 4 will formalize them. This page documents what is actually shipped today.
Info
packages/ui/src/styles/globals.css: only two easing vars. Tailwindduration-* utilities and Framer Motionduration props are used ad-hoc.Motion principles#
- Communicate change — motion should explain what happened, not decorate.
- Intentional — every transition has a purpose; avoid animating layout on scroll.
- Subtle micro-interactions — hover/active feedback under 300ms.
- Meaningful emphasis — stronger motion only for entering/exiting or mode changes.
- Respect reduced motion — honor
prefers-reduced-motion. - Fewer is better — two easings are enough for now.
Durations#
No formal duration scale exists in globals.css. Durations are chosen per-component today. Values below are observed current usage — labeled as examples, not official tokens. Phase 4 will introduce --duration-*.
Warning
duration-300 (27×), duration-200 (13×), duration-500 (10×) for CSS, and 0.3–0.6s for Framer Motion. There is no single source.Visual duration comparison — same easing (ease-out-strong)
Keep interactive feedback ≤ 300ms; reserve 500ms+ for large surface changes. Framer examples in the codebase use duration: 0.3–0.7.
CSS transitions
duration-150 / 200 / 300
Tailwind utility — most common in components.
Framer Motion
duration: 0.3 — 0.6
JS-driven — modals, drag, springs.
Not yet tokenized
— no --duration-*
Will be added in Phase 4 Tokens.
Easing#
Two cubic-bezier variables are the current implementation. Both are defined in :root and .dark (same values). Framer Motion mirrors them via packages/ui/src/lib/ease.ts for JS animations.
Ease Out Strong
--ease-out-strong
cubic-bezier(0.23, 1, 0.32, 1)
Snappy deceleration — fast start, soft landing. Entries and reveals.
Use: entrances, hover lifts, page elements appearing
transition: 700ms cubic-bezier(0.23, 1, 0.32, 1)
Ease In-Out Strong
--ease-in-out-strong
cubic-bezier(0.77, 0, 0.175, 1)
Smooth both ends — held entrance and exit. Modal and drawer transitions.
Use: exits, modals, full-page transitions
transition: 700ms cubic-bezier(0.77, 0, 0.175, 1)
CSS: transition-timing-function: var(--ease-out-strong);
Tailwind: ease-[var(--ease-out-strong)] or ease-[cubic-bezier(0.23,1,0.32,1)]
Framer: transition: { ease: [0.23, 1, 0.32, 1] } · see packages/ui/src/lib/ease.ts
Interactive comparison
Same distance, same duration (700ms) — only easing changes. ease-out-strong feels snappy; ease-in-out-strong lingers at both ends. Linear is mechanical — avoid for UI.
JS mirror: EASE_OUT = [0.16, 1, 0.3, 1] in ease.ts is the Framer-friendly approximation. CSS vars remain the source of truth for stylesheets — do not diverge from them. Spring presets (SPRING_PRESS, SPRING_PANEL, etc.) are also in that file and are documented under Animations.
Transitions#
Practical transition types — hover or focus to preview. All use existing Tailwind utilities; no new motion abstraction. Durations are labeled as current examples.
Opacity
transition-opacity duration-200
Fades — tooltips, overlays, disabled states.
Transform — translate
transition-transform duration-300
Lifts — cards, buttons (use translate, not top).
Scale
transition-transform duration-200
Press feedback — keep subtle (1.02–1.05).
Color / background
transition-colors duration-200
Buttons, links — color only, never layout.
Border / shadow
transition-[border-color,box-shadow] duration-300
Cards and panels — pair with shadow tokens.
Animations#
Restrained Framer Motion specimens — documentation only. Each loops only if reduced motion is not preferred. Springs are already in packages/ui/src/lib/ease.ts.
Fade
opacity 0 → 1, 0.4s
Slide
y 8 → 0, 0.4s ease-out
Scale
scale 0.96 → 1, 0.35s
Spring
SPRING_PRESS — tap me
<motion.div initial={{ opacity: 0 }} animate={{ opacity: 1 }} transition={{ duration: 0.4, ease: [0.23, 1, 0.32, 1] }} />
Springs: SPRING_PRESS / PANEL / LAYOUT from packages/ui/src/lib/ease.ts — use via Framer type: "spring".
Interaction examples#
Hover, focus, and active states — all with existing utilities. Durations are examples, not tokens.
Hover lift — duration-300 ease-out-strong
Card hover
Lifts — transform + shadow
Focus ring — duration-150
Active press — spring
Uses SPRING_PRESS — already in ease.ts.
Reduced motion#
Required: prefers-reduced-motion
All demos on this page check useReducedMotion() (Framer) or @media (prefers-reduced-motion: reduce) and disable or collapse motion to an instant transition. Do not disable accessibility to make demos more impressive.
CSS approach
@media (prefers-reduced-motion: reduce) {
.motion { transition: none !important; }
.motion { animation: none !important; }
}
Use for pure CSS transitions/animations.
Framer approach
const shouldReduce = useReducedMotion()
transition={{ duration: shouldReduce ? 0 : 0.4 }}
// SPRING_* already respects this if guarded
Used throughout this page — animations pause when reduced.
Detected preference: no-preference — animations enabled · Try in DevTools → Rendering → Emulate prefers-reduced-motion
Existing components already use motion-reduce:transition-none and useReducedMotion — e.g., pricing-01/02 blocks and scroll choreography.
Guidelines#
- Use
var(--ease-out-strong)for entrances and hover feedback;var(--ease-in-out-strong)for paired enter/exit (modals, drawers). - Keep durations as
duration-150–300for UI, reserve 500ms+ for large surfaces. Do not invent duration tokens until Phase 4. - Prefer transform/opacity over height/width — compositor-friendly, no layout thrash.
- Springs: use
SPRING_PRESS(stiffness 500) for taps,SPRING_PANELfor overlays — both already inease.ts. - Always guard with prefers-reduced-motion — instant (duration 0) is the accessible fallback.
- Avoid animating on scroll or on every card — motion must communicate change.
transition: transform 300ms var(--ease-out-strong);
transition: opacity 200ms ease-out;
/* Framer */ transition: { duration: 0.4, ease: [0.23, 1, 0.32, 1] }
Framer Motion in this project#
Framer Motion ^12.23.26 is already installed (apps/web/package.json). Real usage in the repo: docs preview spring (type: "spring" damping 25 stiffness 300), hero sections, and useReducedMotion checks. No new framework is created here — specimens above reuse motion.* and AnimatePresence directly.

