Cubic Bezier Curve Editor
Visually edit CSS cubic-bezier easing curves and see a live preview of your animation in real time.
The same easing applied to translate, scale, and opacity, from top to bottom.
What is the Cubic Bezier Curve Editor?
In CSS, the `cubic-bezier()` function defines an animation's acceleration curve, but its four numerical parameters are difficult to visualize. This tool provides a hands-on solution. Drag two control points on a graph to intuitively shape the curve, or type in the exact coordinates. As you make changes, you'll see a live "Animation preview" showing how your easing function affects an object's position, scale, and opacity. Drag the points outside the standard area for bouncy, overshoot effects. The editor includes 18 common presets, like `easeOutBack` and Google's "material standard", to get you started.
How to use
- Drag the two colored points on the graph to shape the curve. You can also enter values directly into the `x1`, `y1`, `x2`, and `y2` input fields.
- Watch the "Animation preview" to see how your curve looks in motion. Adjust the "Duration" slider or toggle the "Loop" checkbox to test different timings.
- Click a chip from the "Presets" list, like `ease-out` or `easeInOutBack`, to load and compare common easing functions.
- Once you have a curve you like, copy the `cubic-bezier()` value or the complete ruleset from the "CSS code" box to use in your stylesheet.
Cubic Bezier Curve Editor guide
How this tool is used in real work, and what to watch out for.
Why `ease-out` Is Almost Always the Right Answer
If you only have time to learn one easing function, make it `ease-out`. It's a curve that starts fast and ends smoothly, and for good reason.
The speed at which the screen responds after a user clicks a button determines the "perceived responsiveness." If you use `ease-in` (starts slow), it feels like nothing happens for a moment after the click. Even with the same duration, an `ease-in` animation feels much more sluggish. In contrast, `ease-out` feels instantaneous because it shoots out immediately and then settles slowly.
| Situation | Easing | Reason |
|---|---|---|
| Element appears (modal, tooltip, dropdown) | ease-out | Feels instantly responsive. The right choice in most cases. |
| Element disappears (closing, deleting) | ease-in | The user already knows the outcome, so get it out of the way quickly. |
| Moving from A to B (tab switch, carousel) | ease-in-out | Smooth at both ends, making back-and-forth motion feel natural. |
| Progress/loading bar | linear | The speed *is* the information. Easing distorts the perception of progress. |
| Emphasis/attention (notification badge) | easeOutBack | Grabs attention by slightly overshooting before settling. |
Duration: Longer Isn't Better
The duration is just as important as the easing curve. And most people set it for too long. The 800ms default in the preview is for making the curves visually distinct, not for production use.
In a real UI, 200–300ms is the baseline. Below 100ms, users might not even notice an animation happened. Above 500ms, they start to wait. A user might see that screen dozens of times a day. A 600ms transition that seemed elegant at first becomes an obstacle by the tenth viewing.
- Under 100ms: For color changes or tiny state changes (like a checkbox). Basically instantaneous.
- 150–250ms: For hover effects, button feedback, and the appearance of small elements. The most common range.
- 250–350ms: For modals, dropdowns, and expanding cards. Medium-sized elements.
- 350–500ms: For full-screen transitions or page navigation. Anything longer is usually excessive.
- The farther an element travels, the slightly longer its duration should be. An element crossing the screen needs more time than one making a small move.
Overshoot (Elasticity): When to Use It and When to Avoid It
If you drag a control point into the margins above or below the graph, its y-value will go outside the 0–1 range. This creates an elastic effect where the animation overshoots its target before settling back. That's why this tool includes that extra space.
A classic example is `easeOutBack` (.34, 1.56, .64, 1). It gives a sense of physical weight by popping out slightly before settling into place.
- When to use it: For short, celebratory, or attention-grabbing moments like an "add to cart" confirmation, a "like" heart, or a notification badge.
- When to avoid it: In frequently repeated UI like modals, dropdowns, or tooltips. A constant bouncing effect quickly becomes annoying and distracting.
- When to *absolutely* avoid it: For large elements. A panel that takes up half the screen bouncing in and out can cause motion sickness.
- In animations that shift the layout: The overshoot can push adjacent elements, causing the entire screen to jiggle as they shift back and forth.
What You Can't Do with a Single Cubic Bezier
You can't create a true bounce effect with `cubic-bezier`. A ball bouncing multiple times on the ground requires a curve that goes up and down repeatedly, and a cubic-bezier curve simply can't form that shape. It can only overshoot once.
For that kind of motion, you need other methods.
/* Multiple bounces — not possible with cubic-bezier, use keyframes */
@keyframes bounce-in {
0% { transform: scale(.3); opacity: 0; }
50% { transform: scale(1.08); opacity: 1; }
70% { transform: scale(.96); }
85% { transform: scale(1.02); }
100% { transform: scale(1); }
}
.pop { animation: bounce-in 400ms ease-out both; }
| What you need | Method |
|---|---|
| Multiple bounces | Use `@keyframes` to specify the intermediate points directly. |
| Stepped (frame-by-frame) animation | Use the `steps(n)` timing function. |
| True spring physics | Use a JavaScript animation library. |
| Speed that varies with gestures | Requires JavaScript. CSS easing uses a fixed curve. |
Some Users Prefer Reduced Motion
For people with vestibular disorders, on-screen motion can cause actual dizziness and nausea. That's why operating systems have a "Reduce Motion" setting, which browsers expose to CSS via the `prefers-reduced-motion` media query.
For users who enable this setting, you should disable or drastically shorten your animations. A simple cross-fade is often better than removing movement entirely, as it helps maintain context without being jarring.
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: .01ms !important;
animation-iteration-count: 1 !important;
transition-duration: .01ms !important;
scroll-behavior: auto !important;
}
}
Frequently asked questions
When should I use `ease-in` vs. `ease-out`?
Use `ease-out` (starts fast, ends slow) for elements appearing or responding to input, as it feels more responsive. Use `ease-in` for elements leaving the screen. For start-to-end motion, `ease-in-out` is a balanced choice.
Can the y-values be less than 0 or greater than 1?
Yes. The y-coordinates can go outside the 0–1 range to create "bouncy" or overshoot effects where the animation extends past its final state before settling. The x-coordinates (time) must remain between 0 and 1, which this tool enforces.
Where do I use this code? `transition` or `animation`?
Both. The `cubic-bezier()` function works as the value for both the `transition-timing-function` and `animation-timing-function` properties. The tool generates CSS that you can copy for either use case.
What's the difference between the presets?
They provide common motion styles. `ease` is a good default. `easeOutExpo` gives a very fast, dramatic start. `easeOutBack` creates a slight overshoot effect. "material standard" is the curve used in Google's Material Design system for natural-feeling motion.