Toolstia / Cubic bezier generator

Cubic bezier generator

Shape an animation curve by typing the two control points and watch the curve and a moving ball. Choose from presets like ease and ease-out-back, then copy the transition-timing-function or the full transition shorthand.

This matches the built-in keyword ease.

cubic-bezier(0.25, 0.1, 0.25, 1)Timing function

A cubic-bezier curve describes how an animation speeds up and slows down. The two x values must stay between 0 and 1, while the y values can go beyond that to create overshoot and bounce. The red handles show your two control points.

How it works

  1. Pick a preset or type four numbers.
  2. Check the curve and press Play preview.
  3. Copy the CSS.

Control points

The curve starts at 0,0 and ends at 1,1. The four numbers are the x and y of two handles that pull the curve.

Allowed values

The x values must stay between 0 and 1. The y values can go beyond to overshoot, which creates a springy bounce.

Presets

Includes the CSS keywords ease, ease-in, ease-out and ease-in-out plus popular back and quint curves.

Where to use it

In transition-timing-function and animation-timing-function, or inside the transition shorthand.

Questions

What is a good easing for menus?

Ease-out feels natural for things entering the screen, since they decelerate as they arrive. Everything happens in your browser, and nothing you enter is sent anywhere.

Why do y values above 1 bounce?

The motion goes past the end point and then returns, which looks like overshoot.

Can I use more than two control points?

Not with cubic-bezier. For multi-step motion use keyframes.