Skip to content

Cubic Bezier Generator: CSS Easing Functions

Design custom CSS easing with cubic-bezier(): drag the control points, try presets like easeOutCubic and easeOutBack, and compare your curve with ease in a live animation.

Presets

Preview

Your curve
ease (default)

CSS code

How to create a custom easing curve

  1. Start from a preset: the CSS keywords (ease, linear, ease-in, ease-out, ease-in-out) or popular curves such as easeOutCubic, easeOutExpo and easeOutBack.
  2. Drag the two control points on the graph, or type exact values for x1, y1, x2 and y2.
  3. Press Play to compare your curve with the default ease at different durations.
  4. Copy the cubic-bezier() value for a transition or an animation.

How cubic-bezier() works

The horizontal axis is time and the vertical axis is progress. The curve always starts at (0, 0) and ends at (1, 1); the two control points shape what happens in between. The x values must stay between 0 and 1, but y values can go beyond that range, which makes an animation overshoot and come back, like the Back curves.

  • Ease out (fast start, slow end) feels responsive. Use it for elements entering the screen, menus and dialogs opening.
  • Ease in (slow start, fast end) suits elements leaving the screen.
  • Ease in-out works for elements that move from one place to another on screen.
  • Linear is best for continuous motion such as spinners and progress bars.

Animation tips

  • Keep interface animations short: 150–300ms for small changes, up to 500ms for large panels.
  • Animate transform and opacity; they are cheap for the browser to render.
  • Respect prefers-reduced-motion and remove large movements for users who ask for less motion.

In Tailwind CSS, use the value as an arbitrary class: ease-[cubic-bezier(0.34,1.56,0.64,1)].

More CSS tools