Spring animation values that feel like Apple’s
Start with { type: 'spring', stiffness: 420, damping: 32 }: it settles in about 300 ms with 2% overshoot. Go stiffer for small things, fully damped for sheets, softer for big surfaces, and save bounce for moments of delight.
Updated · 4 min read
Presets
Springs that feel like Apple’s are fast and close to critically damped: a damping ratio of 0.75 to 1 settles in 200 to 400 ms with little visible overshoot. These are the nine springs Framekit reuses, with the numbers computed from the physics.
| Preset | Stiffness | Damping | Mass | Ratio | Settles | Overshoot | Use for |
|---|---|---|---|---|---|---|---|
| Highlight | 460 | 36 | 1 | 0.84 | 200 ms | 0.8% | Shared layoutId pills, tab and segment indicators |
| Snappy | 420 | 32 | 1 | 0.78 | 310 ms | 2% | Icon and label swaps, list rows, menus |
| Press | 600 | 30 | 1 | 0.61 | 260 ms | 9% | Button press (whileTap scale 0.97), magnetic pulls |
| Popover | 380 | 34 | 1 | 0.87 | 240 ms | 0.4% | Popovers, mega-menus, date pickers, modals |
| Card | 380 | 30 | 1 | 0.77 | 330 ms | 2% | Cards and chips that move or resize, stagger grids |
| Sheet | 380 | 36 | 0.8 | 1.03 | 330 ms | none | Drawers and bottom sheets, no bounce at the edge |
| Gentle | 260 | 26 | 1 | 0.81 | 390 ms | 1% | Large surfaces, hero parallax and tilt |
| Bouncy | 500 | 18 | 1 | 0.40 | 500 ms | 25% | Success ticks and confirmations only |
| Soft follow | 120 | 14 | 1 | 0.64 | 580 ms | 7% | Cursor glows, flip cards, ambient dials |
Press looks bouncy at 0.61, but it only scales by 3%, so the overshoot is about 0.3% of the button. It reads as a snap.
springs.ts
export const SPRING = {
highlight: { type: 'spring', stiffness: 460, damping: 36 },
snappy: { type: 'spring', stiffness: 420, damping: 32 },
press: { type: 'spring', stiffness: 600, damping: 30 },
popover: { type: 'spring', stiffness: 380, damping: 34 },
card: { type: 'spring', stiffness: 380, damping: 30 },
sheet: { type: 'spring', stiffness: 380, damping: 36, mass: 0.8 },
gentle: { type: 'spring', stiffness: 260, damping: 26 },
bouncy: { type: 'spring', stiffness: 500, damping: 18 },
softFollow: { type: 'spring', stiffness: 120, damping: 14 },
} as const
// <motion.div layoutId="pill" transition={SPRING.highlight} />See them in Glass Segmented Control (Highlight), Command Menu (Snappy), Detent Sheet (Sheet) and Face Scan Pay Button (Bouncy).
Stiffness, damping and mass
Stiffness sets speed, damping removes energy and mass adds inertia. What you actually feel is the damping ratio, ζ = damping ÷ (2√(stiffness × mass)). Below 1 the value overshoots, at 1 it arrives as fast as it can without overshooting, and above 1 it creeps in.
Most UI sits between 0.8 and 0.95, sheets want 1, and anything under 0.5 is for celebrations. To go faster without changing the feel, raise stiffness and scale damping with √stiffness.
Converting from SwiftUI
SwiftUI uses response (the period in seconds) and dampingFraction. Convert with stiffness = (2π ÷ response)² × mass and damping = 4π × dampingFraction × mass ÷ response, or use Motion’s visualDuration with bounce = 1 − dampingFraction.
swiftui-to-motion.ts
/** SwiftUI .spring(response:dampingFraction:) → Motion spring. */
export function fromSwiftUI(response: number, dampingFraction: number, mass = 1) {
const stiffness = Math.pow((2 * Math.PI) / response, 2) * mass
const damping = (4 * Math.PI * dampingFraction * mass) / response
return { type: 'spring' as const, stiffness, damping, mass }
}
fromSwiftUI(0.3, 0.85) // ≈ { stiffness: 439, damping: 35.6 }, close to HighlightThe same idea in Motion
<motion.div
animate={{ x: 120 }}
transition={{ type: 'spring', visualDuration: 0.3, bounce: 0.15 }}
/>Motion’s period is 1.2 × visualDuration, so that’s a 0.36 s response at ratio 0.85. Framekit’s presets run at 0.26 to 0.39 s, quicker than SwiftUI’s 0.5 s defaults.
Easing curves
When you can’t use a spring, use a strong ease-out. cubic-bezier(0.16, 1, 0.3, 1) is Framekit’s curve for entrances and cubic-bezier(0.65, 0, 0.35, 1) suits symmetric moves. If CSS needs the real spring shape, sample it into a linear() easing.
| Name | Curve | Duration | Use for |
|---|---|---|---|
| Expo out | cubic-bezier(0.16, 1, 0.3, 1) | 320 ms components, 600 to 900 ms scenes | Entrances and reveals |
| Standard | cubic-bezier(0.2, 0, 0, 1) | 160 to 320 ms | Shimmers, small tweens |
| In-out cubic | cubic-bezier(0.65, 0, 0.35, 1) | 400 to 800 ms | Symmetric moves, morphs, loops |
| Hover | ease-out | 150 ms | Colour, border and shadow only |
Snappy (420 / 32) as CSS linear(), 310 ms
.menu {
transition: transform 310ms linear(0, 0.034, 0.116, 0.223, 0.341, 0.459, 0.568, 0.666, 0.75, 0.82, 0.876, 0.921, 0.954, 0.979, 0.996, 1.007, 1.014, 1.018, 1.019, 1.019, 1.017, 1.015, 1.013, 1);
}The docs shell keeps its timing in CSS variables: --duration-micro: 160ms, --duration-component: 320ms and --duration-scene: 720ms. Never use transition: all.
Reduced motion
Keep the final state and drop the movement: slides, scales and parallax become a 150 ms opacity fade, and loops stop. Check prefers-reduced-motion inside the component, because an app-level MotionConfig doesn’t travel with a copied file.
The pattern every Framekit component uses
import { motion } from 'motion/react'
import { usePrefersReducedMotion } from '@/lib/use-reduced-motion'
const SNAPPY = { type: 'spring', stiffness: 420, damping: 32 } as const
export function Panel({ open }: { open: boolean }) {
const reduced = usePrefersReducedMotion()
return (
<motion.div
initial={false}
animate={open ? { opacity: 1, y: 0, scale: 1 } : { opacity: 0, y: reduced ? 0 : 8, scale: reduced ? 1 : 0.96 }}
transition={reduced ? { duration: 0.15 } : SNAPPY}
/>
)
}<MotionConfig reducedMotion="user"> is still a good app-wide default: Motion skips transform and layout animations and keeps opacity. The accessible motion checklist covers focus, keyboard and pause controls.
FAQ
Should I use a spring or an easing curve?
A spring for anything people can interrupt or drag, because it keeps velocity. A curve for entrances, colour and CSS-only effects.
Why does my spring wobble?
The damping ratio is too low. Raise damping or lower stiffness until damping ÷ (2√(stiffness × mass)) is at least 0.75.
What does Motion use if I don’t set any values?
Transforms default to stiffness 500, damping 25 (ratio 0.56, visibly bouncy). A bare type: "spring" gets 100 and 10. Set values explicitly.
Components in this guide
- Glass Segmented Control
An iOS-style segmented control whose selected thumb is a lifted glass pill that springs between segments with a press squish — native radio semantics, arrow keys and an opaque reduced-transparency…
- Magnetic Button
Button that magnetically follows the cursor; the label leans a little further for parallax, with a spring press state. Solid, accent and glass surfaces.
- Detent Sheet
An Apple-style bottom sheet resting at peek, half and full detents — velocity-aware drag with rubber-banding, the background recedes and dims as it rises, and a grabber that also works with tap and…
- Spring Stagger Grid
A filterable tile grid that enters on a diagonal ripple (delay = row + column), re-flows on layout springs when filtered and exits with a quick scale-down.