How to Use Cubic Bezier Playground: A Step-by-Step Guide
Reviewed by the OnlineFree.app team · Updated
Key points
- The Cubic Bezier Playground generates copy-ready cubic-bezier() CSS from two draggable control points in under a minute.
- x1 and x2 are clamped to 0–1 because time cannot reverse; y1 and y2 may exceed that range to create bounce.
- Presets like snappy (0.4, 0, 0.2, 1) and overshoot (0.34, 1.56, 0.64, 1) are tool shortcuts and always output full cubic-bezier() values.
- Preview overshoot on transform, not opacity, because opacity clamps at 1 and hides the bounce.
- The tool computes locally with no sign-up, but it previews a sample box — verify the curve on your real component.
Design a CSS easing curve in under a minute
The Cubic Bezier Playground turns a timing function into something you can see and feel: you drag two control points on a live curve, watch a real DOM element animate at the duration you set, then copy the exact `transition-timing-function` or `animation-timing-function` code. The whole loop — open, shape, preview, copy — takes about 60 seconds, and it runs entirely in the browser with no sign-up.
The order that works best: first choose a starting point in the Preset easing dropdown, or leave it on Custom if you already know roughly what shape you want. Second, drag the two control points until the curve matches the motion in your head. Third, set Duration in milliseconds (the field accepts 50 to 5000 in steps of 10, and defaults to 400). Fourth, pick a Preview property so you feel the curve in context. Finally, copy the snippet.
The preview property matters more than it looks. `transform` (translate plus scale) shows overshoot clearly, `opacity` hides overshoot because opacity clamps at 1, and `width` shows the curve honestly but is the most layout-expensive of the three. If you are designing a bounce, preview on `transform` even if the final use is opacity.
Everything you change recalculates instantly, so you can scrub your way through ideas rather than committing to the first curve you draw. When a curve feels wrong, slow the duration to 2000 ms before judging it — fast motions hide awkward acceleration.
What do the four numbers in cubic-bezier() mean?
A `cubic-bezier()` value holds four numbers — x1, y1, x2, y2 — which are the coordinates of two control points that bend a curve between a fixed start at (0,0) and a fixed end at (1,1). The x axis is time progress and the y axis is value progress, which is why the same four numbers can feel snappy on a 150 ms tooltip and sluggish on a 600 ms panel.
Those endpoints never appear in the code because they cannot move. In `cubic-bezier(0.4, 0, 0.2, 1)`, the first point sits at x 0.4, y 0, and the second at x 0.2, y 1. The tool writes the values in the standard four-number order, so you can paste them without reordering anything.
One rule is not negotiable: x1 and x2 must stay within 0 to 1, because time cannot run backwards. The playground clamps them automatically. y1 and y2 may travel outside 0 to 1, which is exactly how overshoot and bounce easing are built. This split — clamped time, free value — is defined in the CSS Easing Functions spec and summarised well in the MDN documentation for cubic-bezier().
Presets explained: linear, snappy, overshoot and more
The dropdown mixes real CSS keywords with the playground's own shortcuts, and the difference is worth knowing. `linear` is `cubic-bezier(0, 0, 1, 1)`, `ease` is `(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)`. Those five are browser keywords you could type by hand.
The other three are not CSS keywords at all — the tool always emits a full `cubic-bezier()` for them. `snappy` is `(0.4, 0, 0.2, 1)`, a fast-out, smooth-settle curve that suits menus and drawers. `overshoot` is `(0.34, 1.56, 0.64, 1)`, and `spring-ish (soft)` is `(0.22, 1.2, 0.36, 1)`. The y values above 1 in those last two are what make the element pass its target and come back.
Selecting a preset snaps both control points onto the curve; nudging either point afterwards flips the dropdown back to Custom. That behaviour is deliberate — it stops the UI from showing a preset name for a curve you have already edited. If you want a family of related curves across a design system, start from one preset and adjust each variant by small y increments rather than redrawing from scratch.
Why y values above 1 create a bounce
When y1 or y2 exceeds 1, the curve rises above the 1.0 line before dropping back to it, meaning the animated value briefly travels past its destination and returns. With `cubic-bezier(0.34, 1.56, 0.64, 1)` at 400 ms, a card sliding 40 px will visibly go beyond 40 px at around the two-thirds mark and settle by the end. That single overshoot, not extra keyframes, is the entire bounce.
The size of the overshoot scales with how far y goes past 1 and with the distance travelled. A 4 px shift barely shows the bounce; a 200 px drawer slide makes it obvious. If the effect reads as sloppy rather than playful, lower y1 toward 1.1 rather than shortening the duration — the bounce is a value problem, not a timing problem.
Properties that clamp their range will swallow the effect. Opacity cannot exceed 1, so a bouncy opacity curve just looks like a slightly odd fade; use `transform` for the preview when tuning overshoot, then decide whether the final property can express it. Width and height will render the overshoot, but they also force layout work on every frame — acceptable for one element, expensive across a list.
Common mistakes with durations and curves
The most frequent error is judging a curve at the wrong duration. The 400 ms default is a sensible middle for panels and modals, but hover states and small icons usually want 100–200 ms, while full-screen transitions can justify 500–700 ms. The playground accepts anything from 50 to 5000 ms, so test the duration you will actually ship rather than the default.
The second mistake is using one curve for everything. Enter and exit gestures usually want different shapes: `ease-out` (fast start, gentle landing) reads as responsive when something appears, while a shorter `ease-in` feels tidy when it disappears. In practice, exits are often 60–70% of the entrance duration. A symmetric curve on both directions is the fastest way to make an interface feel mechanical.
Third, paste-and-forget. The generated snippet is correct CSS, but the tool previews on a sample box — not on your component with your transform stack, your `will-change` hints, or your reduced-motion rules. Verify the pasted value in your own page, and wrap decorative motion in a `prefers-reduced-motion` media query so users who ask for less animation get a short or instant transition. Treat the copied number as a starting point you confirm, not a guarantee.
Is Cubic Bezier Playground private to use?
Yes — the curve maths runs in the page with JavaScript, so nothing you drag, type, or copy is uploaded to a server. There is no account, no project list, and no saved history: your curve exists in the tab until you close it or reload. That also means there is nothing to export later, so copy the snippet before you navigate away.
It is one of several browser-only utilities on OnlineFree.app, all built on the same principle that the computation stays local. If a privacy policy or an employer's rules require you to know where design tokens are generated, a client-side tool of this kind is easy to justify.
The honest limitation is scope. The Cubic Bezier Playground generates and previews easing functions; it does not audit your stylesheet, detect duplicate curves across a codebase, or measure real frame rates on low-end devices. Pair it with your browser's performance panel when a curve looks fine in isolation but stutters in situ.
Frequently asked questions
Is the Cubic Bezier Playground free to use?
Yes. The Cubic Bezier Playground is free, requires no sign-up, and runs entirely in your browser. You drag the two control points, set a duration, preview the easing on a sample element, and copy the generated CSS. There are no paid tiers, no watermarks in the snippet, and no account needed to save or export anything — you simply copy the code.
Can cubic-bezier() values exceed 1 to create a bounce?
Only the y values can. The CSS spec requires x1 and x2 to stay between 0 and 1 because time cannot run backwards, and the playground clamps them for you. y1 and y2 are free to go outside 0–1, which is how curves like cubic-bezier(0.34, 1.56, 0.64, 1) push an element past its target and settle it back.
Does the tool send my curves to a server?
No. Every calculation happens locally in the page, so control points, durations, and copied snippets never leave your browser. Nothing is stored between sessions either — reload the tab and you start from the default curve. If you need the value later, copy the snippet before closing the page, since there is no history to recover it from.
Can I use the generated code for animations as well as transitions?
Yes. The four numbers work identically in transition-timing-function and animation-timing-function, and the playground lets you choose which property to preview so the motion matches the context. For keyframe animations, remember the curve applies per keyframe segment by default, so a three-stop animation uses your easing twice rather than once.
Why does my curve feel different in my own project?
Distance, duration, and the animated property all change how a curve reads. The same cubic-bezier will feel snappy over 40 pixels at 200 ms and sluggish over 400 pixels at 600 ms. Check that you pasted the duration as well as the curve, confirm nothing else overrides the transition, and preview on the property you actually animate.