๐ขCSS Cubic-Bezier & Animation Easing Generator Documentation & Guide
๐How to Use This Tool
- Select a Preset Easing: Click any preset chip (e.g. Snappy Spring, Elastic Overshoot, or Ease-Out) to load production-tested control curves.
- Tweak Control Points: Fine-tune coordinates \(x_1, y_1, x_2, y_2\) using the interactive sliders. Note that \(y\) coordinates can exceed \(1.0\) to create bounce and elastic spring rebounds.
- Preview Motion: Watch the simulated runner compare linear progression side-by-side with your custom easing curve in real time. Adjust duration as needed.
- Export CSS & Tailwind: Click ๐ข Generate Easing CSS to compile standard CSS, Tailwind CSS arbitrary classes, and Web Animations API code.
โ๏ธThe Bernstein Polynomial & Coordinate Constraints
CSS timing functions evaluate a third-order parametric Bรฉzier curve between fixed anchors \(P_0(0, 0)\) and \(P_3(1, 1)\):
cubic-bezier(0.34, 1.56, 0.64, 1) produce lightweight zero-runtime physics without heavy JavaScript spring engines.๐กPractical Use Cases & Best Practices
- Interactive Button Presses: Use snappy curves with fast durations (150msโ200ms) for hover states and active button depresses.
- Modal Entrance & Drawer Sheets: Pair
ease-outor spring overshoot on drawer entrances, and switch to high-speedease-inon dismissal to ensure UI responsiveness. - Avoid Linear for Physical Objects: Linear motion looks robotic and unnatural for spatial movement; reserve
linearfor continuous background loops and color fades.