A CSS transition cubic bezier bounce uses transition-timing-function: cubic-bezier(x1, y1, x2, y2), where an output-progress control point above 1 can create an overshoot before the value settles.
The cubic-bezier() function controls how elapsed time maps to animated progress. It can shape a single overshoot-and-return effect, but it does not model spring physics, generate keyframes, or supply the rest of a CSS transition. Try the CSS Cubic Bezier Generator to do this in your browser.

Create the bounce transition in CSS
- Choose the property and destination. Decide what will move, how far it will travel, and what triggers the change. A transform such as translateY() or scale() is often easy to judge visually, while the final test must use the property and distance from the real interface.
- Open the CSS Cubic Bezier Generator and choose an input. Select a standard easing preset or enter x1, y1, x2, and y2. For a first overshoot trial, place a y control above 1 while keeping both x controls within the valid range.
- Tune and inspect the curve. Review the graph, numeric progress samples, and Run preview. The preview uses the exact generated easing string, so it reveals the direction of the motion rather than merely displaying the curve shape.
- Copy the complete declaration. The output is a transition-timing-function declaration with all four coordinates and a trailing semicolon. Browser policy may request clipboard permission; if access is denied, the declaration remains visible and selectable rather than being reported as successfully copied.
- Add the transition property and duration. Paste the declaration into the relevant CSS rule and define transition-property and transition-duration separately. The generator does not create a full transition shorthand.
- Trigger and test both directions. Apply the state change through hover, focus, activation, or the component’s normal interaction. Check the forward movement and the return movement on the actual element, at the intended distance and duration.
Example transition rule: .card { transition-property: transform; transition-duration: 420ms; transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); }
Example trigger: .card:hover, .card:focus-visible { transform: translateY(-12px); }
The four numbers above are one usable starting point, not a universal bounce formula. The amount of overshoot depends on the whole curve, and the same timing can feel different when the element travels another distance or uses another duration.
Choose controls that create the overshoot
Every CSS cubic-bezier curve starts at the fixed point 0, 0 and ends at 1, 1. The two editable points describe intermediate control positions: x1 and x2 locate input-time progress, while y1 and y2 determine output progress. Because x represents elapsed-time position, CSS requires x1 and x2 to stay in the closed range from 0 through 1.
| Effect | Control-point approach | What to verify |
|---|---|---|
| Overshoot and settle | Use an output-progress y control above 1 | The animated value passes its destination before returning |
| Anticipation | Use an output-progress y control below 0 | The value briefly moves in the opposite direction before progressing |
| Final approach | Keep the curve’s endpoint at 1, 1 | The motion finishes at the requested destination |
| Constant rate | Use the linear control points | The output progresses evenly with input time |
An above-1 y control creates the possibility of overshoot, but it does not prescribe a fixed bounce distance or number of rebounds. Inspect the generated graph and numeric samples to confirm the intended behavior. The generator constrains x inputs to the valid CSS range, accepts finite y values from -10 through 10, and independently validates those constraints before producing output.
Start from an official easing preset
A preset gives the control points a useful baseline before you add an overshoot. These are the standardized mappings defined by CSS Easing Functions Level 1:
| CSS keyword | Control points | Standard character |
|---|---|---|
| linear | 0, 0, 1, 1 | Constant-speed progression |
| ease | 0.25, 0.1, 0.25, 1 | Standard acceleration and deceleration |
| ease-in | 0.42, 0, 1, 1 | Slow start followed by faster motion |
| ease-out | 0, 0, 0.58, 1 | Faster start followed by a slow finish |
| ease-in-out | 0.42, 0, 0.58, 1 | Slow start and slow finish |
Selecting a keyword does not hide its behavior behind the keyword name. The visible declaration exposes all four numbers so the curve can be recorded, compared, and modified without concealed defaults. The W3C CSS Easing Functions Level 1 specification defines the syntax, x-coordinate validity rule, and standardized keyword mappings.
Read the graph and progress samples
The graph keeps a stable zero-to-one frame so ordinary curves can be compared. A deliberately extreme y value can extend beyond that visible square, but the preview and samples still use the actual computed easing. Do not interpret the frame boundary as proof that the output was clamped.
The sample table reports output progress at input times of 0, 0.25, 0.5, 0.75, and 1. To calculate each sample, the generator finds the curve parameter whose x coordinate matches the requested input progress and then evaluates its y coordinate. This distinction matters: the value shown at 50 percent input progress is not necessarily the y value at curve parameter t equal to 0.5.
Run preview toggles a circle between two horizontal positions with a 900ms transform transition and the exact generated easing string. Repeated clicks allow a forward-versus-reverse comparison. The preview demonstrates timing rather than production performance, so distance, duration, property, rendering cost, input device, and surrounding motion can still change how the final interface feels.
Calculation happens in the browser. No curve, CSS, or interaction data is uploaded, stored, or sent to an animation service. The solver uses full JavaScript numeric precision during calculation, while the displayed declaration rounds serialized coordinates to three decimal places.
Test the timing in the final interface
Paste the copied declaration into the real component and test the intended property, travel distance, and duration. A transform preview may look balanced at the generator’s scale but feel abrupt on a large panel, while a small control can reveal the overshoot more clearly. Test focus, pointer, and keyboard activation as well as the primary trigger.
Large overshoots can make an element appear to reverse, leave its container, or reveal content that was expected to remain clipped. Check those cases explicitly, especially when the animation changes scale or position inside a masked region. A technically valid curve is not automatically an accessible or appropriate motion design.
Respect reduced-motion preferences when the movement is not essential. One simple approach is to disable the transition inside a prefers-reduced-motion media query: @media (prefers-reduced-motion: reduce) { .card { transition-property: none; } }. Important state changes must remain understandable without motion, and rapid oscillation should be avoided.
Keep a cubic-bezier bounce in scope
A cubic-bezier curve is well suited to one deliberate overshoot and settle. It does not generate a repeatable multi-impact spring, keyframe sequence, linear() stop list, or steps() timing pattern. It also does not choose the duration, delay, iteration count, or full transition shorthand. A true sequence of rebounds generally calls for a different animation approach.
Use the generated function as one controlled part of the transition, then verify the complete interaction. The MDN cubic-bezier() reference provides additional browser-oriented examples and behavior details. The most reliable result comes from combining a valid curve with a deliberate destination, restrained overshoot, an appropriate duration, and an accessible final implementation.
If you're weighing options, CSS Create Triangle: Direction, Dimensions, and Code covers this in detail.
If you're weighing options, HTML and CSS Color Names Chart: Filter Rules and Copying covers this in detail.