Motion

animation

Applying an animation between styles.

Overview

ClassDeclarations
animate:fadeanimation: var(--animate-fade);
animate:pinganimation: var(--animate-ping);
animate:flashanimation: var(--animate-flash);
animate:heartanimation: var(--animate-heart);
animate:jumpanimation: var(--animate-jump);
animate:pulseanimation: var(--animate-pulse);
animate:rotateanimation: var(--animate-rotate);
animate:shakeanimation: var(--animate-shake);
animate:zoomanimation: var(--animate-zoom);
animate:floatanimation: var(--animate-float);
animate:<name>animation: <name>;
animation:<name>|<duration>|<…>animation: <name> <duration> <…>;

Basic usage

Use animate:* to apply a named animation token from the animate namespace. Use the native animation:* shorthand when you want to write the keyframe name, duration, easing, fill mode, and other animation parts together.

Ping indicator

Use the ping animation to indicate that the shop is open.

vegetable salad in bowls
Open
Master Food
<svg class="inline-block fill:green-40 size:2x overflow:visible" viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg">    <circle class="animate:ping transform-origin:center" cx="4" cy="4" r="4" />    <circle cx="4" cy="4" r="4" /></svg>

Rotate indicator

Use the counterclockwise rotate animation to indicate that data is being restored.

Restoring ...
<svg class="animate:rotate animation-direction:reverse" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">    <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>    <path d="M15 4.55a8 8 0 0 0 -6 14.9m0 -4.45v5h-5"></path>    <path d="M18.37 7.16l0 .01"></path>    <path d="M13 19.94l0 .01"></path>    <path d="M16.84 18.37l0 .01"></path>    <path d="M19.37 15.1l0 .01"></path>    <path d="M19.94 11l0 .01"></path></svg>

Advanced usage

Loading spinner

Use the fade animation on SVG paths with regular delays to create a loading spinner.

Loading ...
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">    <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>    <path className="animate:fade animation-delay:-.875s" d="M7.75 7.75l-2.15 -2.15"></path>    <path className="animate:fade animation-delay:-.75s" d="M12 6l0 -3"></path>    <path className="animate:fade animation-delay:-.625s" d="M16.25 7.75l2.15 -2.15"></path>    <path className="animate:fade animation-delay:-.5s" d="M18 12l3 0"></path>    <path className="animate:fade animation-delay:-.375s" d="M16.25 16.25l2.15 2.15"></path>    <path className="animate:fade animation-delay:-.25s" d="M12 18l0 3"></path>    <path className="animate:fade animation-delay:-.125s" d="M7.75 16.25l-2.15 2.15"></path>    <path className="animate:fade" d="M6 12l-3 0"></path></svg>

Apply conditionally

Apply styles based on different states using selectors and conditional queries.

<div class="animate:fade:hover animate:fade@sm animate:fade@dark animate:fade@print">…</div>

Customization

Add your animations

Customize managed CSS animations with @theme keyframes.

@theme {    @keyframes slide-in-up {        from {            transform: translateY(100%);        }        to {            transform: translateY(0);        }    }}

Apply the custom animation using animation syntax:

<div class="animation:slide-in-up|slower"></div>

  • Master UI


© 2026 Aoyue Design LLC.MIT License
Trademark Policy