Linear Easing Generator
Visually create CSS linear() animation curves.
Double-click to add points. Drag to move. Double-click point to remove.
Mastering the CSS linear() Easing Function
Animation on the web has evolved. For years, developers were limited to basic keywords like ease-in-out or the slightly more flexible cubic-bezier(). However, these methods struggled to create complex, realistic physical effects like bouncing or elasticity without relying on heavy JavaScript libraries.
Enter the CSS linear() easing function. This tool allows you to visually design these complex curves and export them as a lightweight, native CSS string.
💡 Why use linear() instead of JavaScript?
Using CSS for animation runs off the main thread (on the Compositor), ensuring buttery smooth 60fps animations even if the browser is busy running heavy scripts. It is the most performant way to animate bounces and springs.
How This Generator Works
This tool simplifies the math behind piecewise linear functions. Here is the workflow:
- Visual Editor: The grid represents Time (Horizontal) vs. Progression (Vertical). The standard animation goes from bottom-left (0% time, 0% progress) to top-right (100% time, 100% progress).
- Adding Points: Double-click anywhere on the grid to create a new keyframe. This breaks the line into segments.
- Creating Bounces: Drag a point above the top line or below the bottom line. This tells the browser to "overshoot" the target value, creating a bounce or recoil effect.
- Code Generation: The tool calculates the coordinates and formats them into a valid `linear(value percent, ...)` string supported by all modern browsers.
Understanding the Syntax
The code generated looks like this: linear(0, 0.25 25%, 1 100%).
This tells the browser: "Start at 0. At 25% of the animation duration, be at value 0.25. At 100% of the duration, be at value 1." The browser then draws straight lines between these points. By adding enough points, we can approximate smooth curves that `cubic-bezier` simply cannot handle.
Frequently Asked Questions (FAQ)
linear() function is supported in Chrome 113+, Edge 113+, Firefox 112+, and Safari 17.2+. It is safe to use for modern web projects.cubic-bezier() defines a smooth curve using two control handles (math). It is smooth but cannot do complex shapes like bounces. linear() connects many specific points with straight lines, allowing for any shape imaginable, but requires more code (which this tool generates for you).
Read Also: