liveBook · Manning

Cubic-bezier()

As explained in Math for Web Design

cubic-bezier() is a CSS timing-function that defines an animation progression with a cubic Bézier curve.

cubic-bezier() is a CSS timing function for shaping animation progress. It fixes the curve’s endpoints at (0,0) and (1,1), then uses two control points to determine how quickly motion starts, changes, and finishes. section 11.2 section 11.2.1

Use four numbers in cubic-bezier(x1, y1, x2, y2):

  • Keep x1 and x2 within [0, 1]. section 11.2.1
  • Use y1 and y2 to shape acceleration and deceleration; values below 0 create anticipation, while values above 1 create overshoot. section 11.2.1
  • Read steep slopes as rapid changes and level slopes as slower motion. section 11.2.1

Snappy toggle animation

transition: transform 1000ms cubic-bezier(0.2, 0.9, 0.1, 1.0); creates a fast-starting, slow-finishing toggle motion. A shorter duration, such as 250ms, is suggested for production use. section 11.2.1

Responsive interaction feedback

A tooltip uses cubic-bezier(0.4, 0.0, 0.2, 1) with a short 0.15-second transition for immediate, controlled feedback. For a shopping-cart confirmation, cubic-bezier(0.7, -0.5, 0.25, 1.5) supplies bounce and overshoot. section 11.3.3 section 11.4

cubic-bezier(x1, y1, x2, y2)

Inspect the compact four-parameter syntax and the relationship between control points and the resulting curve. section 11.2.1

How Math for Web Design covers it

How deep it goes
Defines syntax, coordinate constraints, slope effects, and practical curve selection, but does not derive the Bézier equations.
Examples
Uses toggle switches, tooltips, shopping-cart bounce feedback, and fade-in animations to compare curve behavior.
What you can do after
Apply it in CSS to create, tune, and debug animation timing for interface feedback.
How it connects
Connects CSS timing functions with animation duration, CSS transitions, transforms, easing curves, and interactive feedback.

Also explained in

Compare how 2 books explain cubic-bezier() →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Math for Web Design. The section links point to the parts of the book it draws on.