CSS Keyframe Animator
Build CSS @keyframe animations visually — configure transforms, opacity, and timing with a live preview.
Last updated: March 25, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is CSS Keyframe Animator?
CSS @keyframe animations enable complex, multi-step animated sequences entirely in CSS — no JavaScript required for the animation logic. Unlike CSS transitions (which animate between two states triggered by events like :hover), @keyframe animations can have unlimited intermediate steps, run automatically on page load, loop infinitely, run in reverse, pause, and be controlled with JavaScript's animation API (element.getAnimations()).
A @keyframe animation is defined by two parts: the @keyframes rule (defining what happens at which percentage of the animation timeline) and the animation property on the element (binding the keyframes to the element and configuring duration, timing, delay, and repeat count). Getting the timing function (ease, ease-in-out, cubic-bezier) right is crucial for making animations feel natural rather than mechanical. This visual builder lets you experiment with all of these properties simultaneously and watch the live preview update as you go.
How to Use CSS Keyframe Animator
Enter a name for your animation in the Name field (e.g., "slideInLeft")
The timeline starts with "from" (0%) and "to" (100%) — click "Add Keyframe" to insert intermediate stops
For each keyframe, select the CSS properties to animate: transform (translateX, scale, rotate), opacity, background-color
Set the animation timing properties: duration, delay, timing-function, iteration-count, direction
Watch the live preview element animate in real time
Copy the full generated @keyframes block and animation CSS shorthand for use in your stylesheet
Common Use Cases
- Creating a loading spinner that rotates infinitely (animation: spin 1s linear infinite)
- Building a smooth "fade in from below" entrance animation for page sections on scroll
- Designing a pulsing "attention" animation for a CTA button using scale and opacity
- Animating a skeleton loading screen shimmer effect using background-position @keyframes
- Creating a typewriter text reveal effect using CSS width animation
- Building a bouncing notification badge using translateY and cubic-bezier for natural feel
- Designing a page transition that slides new content in from the right on route change
- Creating a card flip animation combining perspective, rotateY @keyframes, and backface-visibility
Example Input and Output
A smooth "fade in and slide up" entrance animation for hero content:
Animation Name: fadeSlideUp
Keyframes:
0%: opacity: 0, transform: translateY(30px)
100%: opacity: 1, transform: translateY(0)
Animation Properties:
duration: 0.6s
timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94)
fill-mode: both
delay: 0.1s@keyframes fadeSlideUp {
0% {
opacity: 0;
transform: translateY(30px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
.hero-content {
animation: fadeSlideUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s both;
}Client-Side Processing
All animation previews and CSS generation run locally in your browser. No animation configurations are sent to our servers.
Performance Tip
Always animate transform and opacity, not width, height, top, left, or background-color for performance-sensitive animations. Transform and opacity changes are handled by the GPU compositor thread and do not cause layout recalculation (reflow) or repaint, making them buttery smooth even on mobile devices and lower-end hardware.
Prefers-Reduced-Motion
Always respect the prefers-reduced-motion media query for accessibility. Wrap complex animations in @media (prefers-reduced-motion: no-preference) { ... } so users with vestibular disorders, migraines, or motion sensitivity have a still, distraction-free experience. Animations critical to understanding UI state can use a simple opacity fade as an alternative.
Frequently Asked Questions
What is the difference between CSS transitions and CSS animations?
Which CSS properties can be animated with @keyframes?
What CSS animation timing functions are available?
What does animation-fill-mode: both do?
How do I trigger an animation only when an element enters the viewport?
How do I pause a CSS animation with JavaScript?
How This Tool Works
The keyframe timeline is represented as an array of state objects, each containing a percentage and a map of CSS properties to values. The live preview renders a demo element and applies the fully constructed animation property to it — the browser's own CSS animation engine runs the preview. On each change, the @keyframes rule and animation shorthand are regenerated from the state array by serializing each keyframe's property map and merging the animation timing settings.
Technical Stack