Details & Tips
The seven preset keyframe templates and what they contain:
**Fade In:** `from { opacity: 0; } to { opacity: 1; }` — the simplest and most widely used animation. Works on any element regardless of its size or position. Combine with a slight delay for staggered list entrances.
**Slide Up:** `from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); }` — a classic entrance effect that gives elements a sense of rising into place. The 30px offset is customisable; larger values create more dramatic entrances. Works best on cards, list items, and modal content.
**Bounce:** A multi-stop keyframe using `0%, 20%, 50%, 80%, 100%` with alternating translateY values (0, -30px, 0, -15px, 0) to simulate a bouncing object settling to rest. The exact keyframe percentages and offsets are shown in the editor and can be adjusted. This animation works well for notification badges, floating action buttons, and anything you want to feel playful.
**Pulse:** Uses `0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); }` with `animation-iteration-count: infinite`. Ideal for attention-grabbing elements like sale badges, new-feature indicators, or loading placeholders. The scale factor (1.05) and the pulse speed are controlled by the duration slider.
**Shake:** Alternates translateX at `10%, 30%, 50%, 70%, 90%` with offsets of -10px, 10px, -10px, 10px, -10px to create a rapid horizontal vibration. Commonly used for error states on form inputs, invalid password confirmations, or any interaction that needs to communicate "that did not work."
**Rotate:** A simple `from { transform: rotate(0deg); } to { transform: rotate(360deg); }` — a full spin. With iteration-count set to infinite and timing-function set to linear, it becomes a continuous rotation perfect for loading spinners. With a finite count and ease timing, it works as an entrance effect for icons or logos.
**Scale:** `from { transform: scale(0); } to { transform: scale(1); }` — elements grow from nothing to full size. Often combined with opacity for a pop-in effect. Works well for modals, tooltips, and image reveals.
**Timing function reference:** `ease` (default, equivalent to `cubic-bezier(0.25, 0.1, 0.25, 1)`) — slow start, fast middle, slow end. `ease-in` (`cubic-bezier(0.42, 0, 1, 1)`) — slow start, fast end. `ease-out` (`cubic-bezier(0, 0, 0.58, 1)`) — fast start, slow end. `ease-in-out` (`cubic-bezier(0.42, 0, 0.58, 1)`) — slow start and end with a fast middle. `linear` — constant speed throughout. `steps(n, start|end)` — divides the animation into n discrete frames with no interpolation between them, useful for sprite-sheet animations.
**Animation direction values:** `normal` (plays forwards each iteration), `reverse` (plays backwards), `alternate` (forwards on odd iterations, backwards on even), `alternate-reverse` (backwards on odd, forwards on even). Alternating directions are essential for smooth bounce or pulse loops because they create a symmetrical motion without needing to define both forward and reverse keyframes.
**Browser compatibility:** All modern browsers support unprefixed `@keyframes` and `animation`. Internet Explorer 10-11 require no prefix for the animation property but have rendering quirks with simultaneous transform and opacity animations — test on real IE if you must support it. Mobile Safari on iOS has historically had issues with `animation-fill-mode: both` when combined with `animation-delay` and `display: none` toggle, though these bugs have been resolved in iOS 14 and later. The CSS output from this tool is standards-compliant and works on all evergreen browsers.
**Performance note:** Stick to animating `transform` and `opacity` whenever possible. These two properties are the only ones that can be animated purely on the compositor thread without triggering layout (reflow) or paint. All seven presets in this tool animate only `transform` and/or `opacity` by default. If you edit the keyframes to add properties like `width`, `height`, `margin`, `left`, `top`, `box-shadow`, or `background-color`, be aware that those will trigger layout or paint and may cause jank, especially on lower-powered mobile devices. The `will-change` CSS property can be used as a hint to the browser that an element will be animated, but it should be used sparingly — only on elements that actually animate, and removed when the animation is done.