Home/Developer Tools/CSS Cubic-Bezier Generator
📈

CSS Cubic-Bezier Generator

FREE

Drag handles to design easing curves for transitions

Free · No sign-up required
Loading...

What the cubic-bezier generator does

Every CSS transition and animation follows a timing function — the curve that maps elapsed time to progress. The built-in keywords (ease, ease-in-out, linear) are fine, but the personality of an interface lives in custom curves: a snappy overshoot on a button, a heavy settle on a modal, a fast-out-slow-in on a drawer. This tool lets you drag the two control handles, preview the motion beside the standard keywords, and copy the cubic-bezier() value. Runs in your browser.

How cubic-bezier() works

transition-timing-function: cubic-bezier(x1, y1, x2, y2); Start point is fixed at (0, 0), end point at (1, 1). (x1, y1) is the first control handle, (x2, y2) the second. x = time (0 to 1), y = progress (0 to 1) — y may go below 0 or above 1 for overshoot.

The curve's steepness at any point is the speed of the animation there. A curve that starts flat and steepens is an ease-in (slow start); one that starts steep and flattens is an ease-out (fast start, gentle stop). Handles pulled past the ends produce overshoot and bounce.

The standard keywords as curves

Keywordcubic-bezier()Feel
linear0, 0, 1, 1Mechanical; good for progress bars and spinners
ease0.25, 0.1, 0.25, 1The default — slightly slow in, slower out
ease-in0.42, 0, 1, 1Slow start; for elements leaving the screen
ease-out0, 0, 0.58, 1Fast start, gentle stop; for elements entering
ease-in-out0.42, 0, 0.58, 1Symmetric; for elements moving within the screen

Curves worth stealing

Namecubic-bezier()Use
Material standard0.4, 0, 0.2, 1General UI motion — fast out, slow in
Material decelerate0, 0, 0.2, 1Entering elements
Material accelerate0.4, 0, 1, 1Exiting elements
iOS default0.25, 0.1, 0.25, 1Same as CSS ease
Snappy0.2, 0.8, 0.2, 1Buttons, toggles, quick feedback
Overshoot (back-out)0.34, 1.56, 0.64, 1Playful pop-in; y2 > 1 goes past the target and returns
Anticipate (back-in)0.36, 0, 0.66, −0.56Pulls back before moving; y2 < 0
Expo-out0.16, 1, 0.3, 1Very fast start, long tail — feels premium

Choosing a curve

  • Entering: ease-out family. The element arrives quickly and settles, which reads as responsive.
  • Exiting: ease-in family. It accelerates away; nobody watches it finish.
  • Moving on screen: ease-in-out or a standard curve.
  • Continuous or indeterminate (spinners, marquees): linear, or the loop will visibly pulse.
  • Duration pairs with the curve. Sharp curves work at 150–250 ms; long expo tails need 400–600 ms to be seen. Motion over 500 ms in UI starts to feel slow unless it is large.

Beyond cubic-bezier

A single cubic curve cannot bounce more than once or model a true spring. For those, CSS offers linear() with a list of progress values (supported in all current browsers since 2023), which can approximate any curve including multi-bounce springs; and the Web Animations API or libraries such as Motion and GSAP provide real spring physics. Steps for frame-by-frame effects use steps(n). For most transitions, though, a well-chosen cubic-bezier is exactly enough.

Frequently asked questions

Can x values go outside 0–1?

No — x is time and must stay within 0 to 1 or the value is invalid. Only the y values may go below 0 or above 1.

Why does my overshoot curve look wrong on opacity?

Opacity clamps at 1, so overshoot has no visible effect above it and looks like a plateau. Use overshoot on transforms (scale, translate), not on opacity or colour.

How do I make an animation feel faster without shortening it?

Use a curve that front-loads the motion, such as expo-out or Material decelerate. Most of the movement happens early, so it feels quick while the tail smooths the stop.

Does the same curve work for transition and animation?

Yes. transition-timing-function and animation-timing-function accept identical values. For keyframe animations the curve applies between each pair of keyframes unless overridden.

How do I preview at real speed?

The generator animates a sample element with your curve next to a reference; set a duration that matches what you will ship.

Should I respect reduced-motion preferences?

Yes. Under @media (prefers-reduced-motion: reduce), shorten or remove animations regardless of curve.

More tools in this category

🌈
CSS Gradient Generator
Build linear, radial and conic gradients and copy the CSS
🪟
CSS Glassmorphism Generator
Frosted-glass panels with backdrop-filter, tint and border
CSS Clip-Path Generator
Circle, polygon, star and custom shapes as clip-path values
CSS Loader Generator
Spinner, dots, bars, pulse and bounce loaders in pure CSS
🖱
CSS Button Generator
Design buttons with hover, active and focus states
🔺
CSS Triangle Generator
Arrows and carets with the border trick or clip-path