Home/Developer, Code & Web Engineering Tools/CSS Cubic-Bezier Transition Curve Builder

CSS Cubic-Bezier Transition Curve Builder

Interactive visual cubic-bezier easing curve designer and CSS transition code generator.

Curve Coordinate Canvas

P1P20.0 (Start)1.0 (End)
Control Point P1 (0.25, 0.1)Control Point P2 (0.25, 1)

Real-Time Animation Preview

1.2 seconds
Your Custom Curvecubic-bezier(0.25, 0.1, 0.25, 1)
P
Linear (Constant Speed)cubic-bezier(0, 0, 1, 1)
L
Ease (Browser Default)cubic-bezier(0.25, 0.1, 0.25, 1)
E
Modal & Card Pop Simulation:
Scale & Opacity Easing

Generated CSS & Framework Snippets

cubic-bezier(0.25, 0.1, 0.25, 1)
CSS Transition Rule:
transition: all 1.2s cubic-bezier(0.25, 0.1, 0.25, 1);
Full CSS Class Declaration:
.custom-animated-element {
  transition: transform 1.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}
Tailwind CSS arbitrary utility:ease-[0.25,0.1,0.25,1]
Framer Motion transition prop:ease: [0.25, 0.1, 0.25, 1]

The Mathematical Mechanics of CSS Cubic-Bezier Curves

In modern web interface engineering, CSS transitions and keyframe animations rely on third-order Bernstein polynomials known as cubic Bézier curves to interpolate numerical states across continuous time. A cubic Bézier curve is anchored by four points: P₀(0, 0), P₁(x₁, y₁), P₂(x₂, y₂), and P₃(1, 1). Because P₀ represents the animation start and P₃ marks 100% progress completion, authors only define the intermediate control handles P₁ and P₂.

Monotonic Time Axis

The horizontal X axis represents elapsed time from 0.0 to 1.0. Because time cannot flow backwards in physical rendering engines, P1x and P2x are strictly constrained to the range [0.0, 1.0].

Unbounded Progress Axis

The vertical Y axis dictates property progress (transform, opacity, color). Unlike the X axis, Y values can exceed 1.0 (overshooting the final target) or drop below 0.0 (anticipatory recoil).

Continuous 1st Derivative

The tangent vectors generated by P₁ and P₂ define instantaneous velocity. Smooth tangents prevent jarring rate-of-change spikes, eliminating optical stutter during interactive transitions.

Parametric Polynomial Formula

For any given normalized progression parameter t ∈ [0, 1], the curve coordinates (Bx(t), By(t)) are evaluated according to the explicit cubic polynomial equation:

B(t) = (1 - t)³ · P₀ + 3(1 - t)² · t · P₁ + 3(1 - t) · t² · P₂ + t³ · P₃

CSS Easing Function Comparison & Timing Benchmarks

Selecting the correct easing function directly influences perceived interface responsiveness. Fast entrances reduce cognitive delay, while gentle exits allow users to track layout shifts naturally:

CSS Timing KeywordCubic-Bezier CoordsAcceleration ProfileRecommended UI Application
ease0.25, 0.1, 0.25, 1.0Rapid acceleration, gentle decelerationDefault browser transition; general layout expansion
linear0.0, 0.0, 1.0, 1.0Constant velocity; zero accelerationInfinite spinning loaders, background color fades, progress bars
ease-in0.42, 0.0, 1.0, 1.0Slow launch, abrupt high-velocity exitDismissing off-screen sheets, notification toast exits
ease-out0.0, 0.0, 0.58, 1.0High initial velocity, friction-damped stopDialog modals opening, drawer slide-ins, tooltips appearing
ease-in-out0.42, 0.0, 0.58, 1.0Symmetrical start and end dampeningCarousel horizontal sliding, accordion expand/collapse
overshoot (elastic)0.34, 1.56, 0.64, 1.0Spring pop past target with physical snapbackGamified badge unlocks, floating action button triggers

Micro-Interaction Architecture: 4 Rules for Fluid Animations

High-quality motion design separates mediocre web applications from polished software experiences. Apply these four core principles when calibrating custom transition curves:

Essential Motion Directives

  • Animate Exclusively Composited Properties: Restrict transitions to transform and opacity. Modifying width, height, or top forces synchronous browser CPU reflows.
  • Keep Durations Under 300ms for Direct Interactions: Hover states and button presses should complete within 150ms to 250ms to maintain instantaneous tactile feedback.
  • Asymmetric Enter/Exit Timing: Elements entering the screen should move faster using ease-out (~200ms), while elements exiting should travel slower using ease-in (~150ms).

Pitfalls That Degrade Performance

  • Overusing Linear Easing on Positional Changes: Objects moving linearly appear robotic and unnatural because physical objects in the real world never start or stop with infinite acceleration.
  • Excessive Overshoot on Dense Layouts: Spring curves with Y > 1.5 risk clipping into neighboring text or triggering accidental horizontal scrollbars if the containing ancestor lacks overflow: hidden.
  • Ignoring prefers-reduced-motion: Always wrap expressive cubic-bezier animations in media queries honoring user accessibility settings to avoid inducing motion sickness.

Frequently Asked Questions (FAQ)

What is a cubic-bezier function in CSS transitions and animations?

A CSS cubic-bezier function defines a parametric smooth curve used to calculate time-to-progression interpolation during transitions and keyframe animations. It is governed by four numbers representing two control points (P1x, P1y, P2x, P2y) between the initial coordinate (0,0) and the terminal coordinate (1,1).

Why must the X coordinates of a cubic-bezier be strictly between 0 and 1?

The X axis on a transition curve represents normalized elapsed time. Because forward physical time cannot flow backwards or exceed 100% of the duration before completion, CSS specifications strictly mandate that P1x and P2x remain in the continuous range [0.0, 1.0].

How do overshoot and anticipation bounce animations work in CSS cubic-bezier?

While X coordinates are bound between 0 and 1, the Y coordinates (representing property progress or displacement) have no bounds in CSS. Setting a Y coordinate greater than 1.0 creates an elastic overshoot bounce past the end target, whereas setting a Y value below 0.0 produces anticipation rollback before advancing.

What is the difference between ease, ease-in-out, and linear?

Linear has a constant velocity slope (0.0, 0.0, 1.0, 1.0) with zero acceleration. Ease starts gently, accelerates rapidly mid-way, and slows down gracefully (0.25, 0.1, 0.25, 1.0). Ease-in-out symmetrically ramps up and decelerates, preventing jarring camera or movement stops on screen.

Does this tool support Web Animations API (WAAPI) and Framer Motion?

Yes. The generated cubic-bezier(x1, y1, x2, y2) tuple is universally compatible with standard CSS transitions, CSS @keyframes, the native browser Web Animations API (element.animate), Framer Motion easing arrays, Tailwind CSS transition timing configs, and GSAP CustomEase plugins.

Found this tool helpful? Share it with others!

Share on Facebook
Share on X
Share on LinkedIn
Copy URL

Related & Complementary Utilities

Explore more privacy-first client-side web tools.