Skip to content
WebTricks

Cubic-bezier easing generator

Design custom CSS easing curves by dragging the control points. Live animation preview, presets and copy the cubic-bezier() value.

Preview
cubic-bezier(0.25, 0.1, 0.25, 1)
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);

What this cubic-bezier generator does

Every CSS easing is a cubic Bézier curve from (0,0) to (1,1): the x-axis is time, the y-axis is progress. This editor lets you drag the two control points on an SVG graph, type exact coordinates, or load a preset, while a ball on a track plays the resulting motion on a 1.6-second loop so you can judge the feel immediately. Two copy buttons give you the bare cubic-bezier(...) value and a full transition-timing-function declaration.

How to use it

  1. Drag the two purple handles. The dashed diagonal is linear for reference.
  2. Watch the Preview ball; it restarts whenever the curve changes.
  3. Click a preset — ease, ease-in, ease-out, ease-in-out, smooth out, back — to start from a known curve.
  4. Fine-tune with the x1, y1, x2, y2 fields (x is clamped to 0–1).
  5. Copy either output and paste it into your CSS.

Preset and reference curves

Namecubic-bezier valueFeelTypical use
linear0, 0, 1, 1constant speedfades, progress bars
ease (CSS default)0.25, 0.1, 0.25, 1slight ease-in, soft ease-outgeneral purpose
ease-in0.42, 0, 1, 1slow start, abrupt endelements leaving
ease-out0, 0, 0.58, 1fast start, soft landingelements entering, hover
ease-in-out0.42, 0, 0.58, 1symmetricalmoving between positions
smooth out (expo)0.16, 1, 0.3, 1very fast start, long settlemenus, sheets, modals
back0.68, -0.55, 0.27, 1.55pulls back then overshootsplayful buttons, toasts
Material standard0.2, 0, 0, 1emphasized deceleratemost Material transitions
Material accelerate0.3, 0, 1, 1exitdismissals
Material decelerate0, 0, 0, 1enterincoming surfaces
Apple-style ease-out0.32, 0.72, 0, 1crisp with long tailsheet presentation
ease-in-out quint0.83, 0, 0.17, 1dramaticpage transitions

The first six are built-in presets; type the others into the number fields.

Reading the curve

  • Steep near the start (y rises quickly for small x) means the motion starts fast — an ease-out.
  • Flat near the start means a slow build — an ease-in.
  • A handle dragged above y = 1 makes progress exceed 100% before coming back: overshoot. Dragging below 0 at the beginning adds anticipation (the element first moves slightly backward).
  • Both x values matter for perceived duration. The same curve feels snappier at 200ms and sluggish at 600ms; pick duration and easing together.

Because the curve is a function of time, it must never fold back on itself — that is why x is clamped to 0–1 but y is free.

Putting it in CSS

.sheet {
  transform: translateY(100%);
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
}
.sheet.is-open {
  transform: translateY(0);
}

@keyframes pop {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.toast {
  animation: pop 300ms cubic-bezier(0.68, -0.55, 0.27, 1.55) both;
}

Animate only transform and opacity for 60fps results; easing applies per-property, so you can give opacity a linear curve and transform an ease-out in the same rule. Respect prefers-reduced-motion by shortening the duration or removing the overshoot. Durations, choreography and the linear() function for multi-bounce springs are covered in the transitions and animations guide.

FAQ

What do the four numbers mean?

They are the x and y of two control points — cubic-bezier(x1, y1, x2, y2). The curve always runs from (0,0) to (1,1); the control points bend it. x is time and must stay between 0 and 1, while y is progress and can go below 0 or above 1 to create anticipation or overshoot.

How do I use the result?

Paste the value into transition-timing-function or animation-timing-function, or into the shorthand — for example transition of transform 300ms cubic-bezier(0.16, 1, 0.3, 1). The tool copies both the bare function and a full declaration.

Why does my curve overshoot past the box?

A y value above 1 or below 0 makes the element move past its target and settle back, which reads as bouncy or springy motion. The back preset shows this. Dragging allows y between -0.6 and 1.6; the number fields accept any value.

What are the values for ease, ease-in, ease-out and ease-in-out?

ease is cubic-bezier(0.25, 0.1, 0.25, 1), ease-in is (0.42, 0, 1, 1), ease-out is (0, 0, 0.58, 1) and ease-in-out is (0.42, 0, 0.58, 1). linear is (0, 0, 1, 1). All four are available as presets.

Can cubic-bezier do a real bounce?

Only a single overshoot. A multi-bounce needs keyframes or the CSS linear() easing function, which takes a list of points. For most UI motion one gentle overshoot is enough.

Which easing should I use for what?

Ease-out curves for things entering or responding to the user (fast start, soft landing). Ease-in for things leaving the screen. Ease-in-out for elements moving from one place to another. Avoid linear except for opacity fades and progress indicators.