Animation
The keyframes Pro ships, and the reduced-motion contract they keep
Pro adds no animation dependency: motion here is CSS, on the core's easing tokens. Four keyframes are Pro's own; everything else — the curves, the looping compositions, the attribute model — comes from the core.
Easing tokens, looping animations and the data-attribute model are in Animation.
Keyframes Pro Ships
| Keyframes | Component | What moves |
|---|---|---|
text-shimmer | TextShimmer | A highlight sweeps across the label |
chat-loader-bounce | ChatLoader | Each dot fades and scales in turn |
chat-loader-pulse | ChatLoader | The pulse variant grows and fades |
button-group-card-indicator-in | CheckboxButtonGroup, RadioButtonGroup | A custom indicator icon fades in when its card is selected |
Only the last runs on a core curve. The three others carry their timing function literally, so
redefining --ease-* retimes the indicator and leaves them as they are.
:is(.checkbox-button-group__indicator, .radio-button-group__indicator)[data-custom="true"] > * {
animation: button-group-card-indicator-in 150ms var(--ease-out);
}Entering and Exiting
A component that opens and closes writes the phase onto the DOM, and its stylesheet selects on it.
ChatSource is the worked example:
.chat-source__preview {
&[data-entering] {
/* animate-in, fade-in-0, zoom-in-95 */
}
&[data-exiting] {
/* animate-out, fade-out, zoom-out-95 */
}
}Match the attribute as the component writes it. Here it arrives bare, from the primitive
underneath; the core's own overlays write data-entering="true" instead. Each component page lists
the attributes it sets.
Reduced Motion
Every animated stylesheet in Pro stands down when the reader asks for less motion — ten of ten,
through the media query or the motion-reduce variant. Keep that contract in anything you add.
.my-shimmer {
animation: text-shimmer 2s linear infinite;
@media (prefers-reduced-motion: reduce) {
animation: none;
}
}TextShimmer also stands down under forced-colors, where its highlight would be repainted into
a system color and the sweep would read as flicker rather than as motion.