Foundations
Motion
1 easing curve, 5 durations. Available as CSS variables and as Framer Motion presets.
Easing
Everything uses easeOutQuint. It starts fast and settles gently, so UI feels responsive without bouncing.
cubic-bezier(0.23, 1, 0.32, 1)
CSS · var(--ease-out-quint)
Tailwind · ease-out-quint
TS · easeOutQuint
Durations
Pick by what moves, not by feel. Press play to compare them. A bare transition-colors or transition-all already uses --duration-instant and ease-out, the hover feel of the pangpond portfolio, so stock shadcn components need nothing extra. With reduced motion on, every duration token becomes 0ms.
| Token | Value | Use for |
|---|---|---|
--duration-instant | 150ms | Hover, color changes, press. The default for every CSS transition (with ease-out) |
--duration-snap | 200ms | Exits, small moves, image hover zoom |
--duration-fast | 250ms | Menus, filters, layout swaps |
--duration-normal | 500ms | Section reveals, cards. The default for Framer Motion presets |
--duration-slow | 700ms | Hero headlines, first impressions |
--duration-decorative | 1000ms | Decorative background elements |
Framer Motion
The motion item adds lib/animations.ts with the same values plus ready presets. Wrap the app once in MotionConfig so every animation respects reduced motion, including the first render.
"use client";
import { MotionConfig } from "framer-motion";
export function MotionProvider({ children }: { children: React.ReactNode }) {
return <MotionConfig reducedMotion="user">{children}</MotionConfig>;
}"use client";
import { motion } from "framer-motion";
import { fadeUpTransition, fadeUpVariants, viewportDefault } from "@/lib/animations";
export function Section({ children }: { children: React.ReactNode }) {
return (
<motion.section
variants={fadeUpVariants}
initial="hidden"
whileInView="visible"
viewport={viewportDefault}
transition={fadeUpTransition}
>
{children}
</motion.section>
);
}useReducedMotion() alone isn't enough: it returns null until after the first render, so the animation has already started by the time it says true.
Rules
- 1 easing curve only. No bounce, no elastic.
- Animate
opacityand transforms only. Never width, height, padding or margin. - Exits run at about 80% of the enter duration.
- Every animation respects reduced motion. CSS transitions using the duration tokens handle it in
theme.css. Fixed durations needmotion-reduce:. Framer Motion needs<MotionConfig reducedMotion="user">.