The same 200 ms move can feel snappy, soft, or slightly wrong, and the curve is usually why. This guide compares the three tools you'll actually ship: CSS ease-out, a custom cubic-bezier(), and a Motion spring, with a demo that switches between them.

What an easing function is

An easing function describes how fast a value changes over the duration of a transition or animation. CSS gives you keywords (linear, ease, ease-in, ease-out, ease-in-out), cubic-bezier(x1, y1, x2, y2) with both x values in [0, 1], steps(), and linear(). Each keyword is shorthand for a cubic Bézier curve:

CSS easing keywords and the cubic-bezier() curves they stand for
KeywordCurveHow it feels
ease-outcubic-bezier(0, 0, 0.58, 1)Starts quickly, settles gently
ease-incubic-bezier(0.42, 0, 1, 1)Starts slowly, hits the end hard
easecubic-bezier(0.25, 0.1, 0.25, 1)The CSS default: a quick rise, a long settle
ease-in-outcubic-bezier(0.42, 0, 0.58, 1)Slow at both ends

For interface elements entering or leaving, ease-out is usually the right default: the element reacts at once and arrives without a bump. That's one of the motion rules behind every piece.

cubic-bezier when the keyword is close but not quite

cubic-bezier(0.22, 1, 0.36, 1) keeps ease-out's early velocity but stretches the settle, so the move reads as a longer glide. It's still a fixed-duration tween, which is why tweens win for choreographed sequences: staggers, fades that must stay in sync, anything that has to finish on a beat.

  • The x values control when progress happens; the y values control how far it gets.
  • A y value outside [0, 1] overshoots the target. Use that sparingly.
  • Interface chrome usually lands between 150 and 400 ms.

Springs when velocity should stick around

In Motion, type: "spring" comes in two flavors (Motion transitions). Physics springs take stiffness, damping, mass and velocity, and they pick up the velocity of any gesture or animation they interrupt. Duration-based springs take duration and bounce (or visualDuration), which makes them easier to line up with timed work.

A good starting point is { type: "spring", stiffness: 280, damping: 22 }. Higher stiffness is snappier, higher damping means less bounce, and on a duration-based spring bounce: 0 means no overshoot.

  • Reach for a spring for gestures, things that should feel like they have weight, and moves where feel matters more than exact timing.
  • Prefer a tween when elements must finish together, when the move should match a duration token, or when you need a clean reduced-motion collapse to duration: 0.

Side by side

Pick a curve, then open and close the panel. Every option moves the same square with transform and opacity; tweens run for 0.55 s so the difference is easy to see.

Easing

Panel closed.

  • ease-out is a decisive start and a soft stop, good for small toggles like Theme Tip.
  • The custom cubic is a longer glide into place.
  • The spring can overshoot a hair. That feels alive after a drag, and sometimes busy for a one-shot fade.

With reduced motion turned on, the square jumps straight to its new spot: the meaning is kept, the movement is dropped. Motion's useReducedMotion reads the visitor's prefers-reduced-motion setting and re-renders when it changes. See how each piece handles reduced motion.

import { useState } from "react";
import { motion, useReducedMotion, type Transition } from "motion/react";
 
const EASINGS: Record<string, Transition> = {
  easeOut: { duration: 0.55, ease: "easeOut" },
  softCubic: { duration: 0.55, ease: [0.22, 1, 0.36, 1] },
  spring: { type: "spring", stiffness: 280, damping: 22 },
};
 
export function Panel({ easing = "easeOut" }: { easing?: keyof typeof EASINGS }) {
  const reduceMotion = useReducedMotion();
  const [open, setOpen] = useState(false);
  const transition = reduceMotion ? { duration: 0 } : EASINGS[easing];
 
  return (
    <>
      <button type="button" aria-expanded={open} onClick={() => setOpen((o) => !o)}>
        {open ? "Close panel" : "Open panel"}
      </button>
      <motion.div
        className="square"
        initial={false}
        animate={{ x: open ? 240 : 0, opacity: open ? 1 : 0.45 }}
        transition={transition}
      />
    </>
  );
}

Pick a default for Motionbits-style UI

A default curve for common interface moves
MoveDefault
Button, toggle, theme flipTween, easeOut, 150 to 250 ms
Panel or sheet enteringA soft cubic, or a lightly damped spring
Drag release or flingA physics spring, so it keeps the gesture's velocity
Staggered list revealTweens with one shared duration (springs drift apart)
Reduced motionInstant, or a short opacity crossfade; never a long spring

Tumble Tabs and Theme Tip have live demos, and the Ship Note template shows a full page of them working together. For auto-playing motion, see pausable heroes and marquees.

Sources

  1. MDN, <easing-function>
  2. Motion, Transitions
  3. Motion, useReducedMotion
  4. MDN, prefers-reduced-motion