Browse documentation
Reference / Variants & accessibility
Reduced motion
Use motion-safe for optional movement and motion-reduce for an alternative when the user requests less animation.
Working example
Show delivery status
Ready for collection.
Set the readable final appearance as the base style. The status appears immediately with reduced motion enabled.
<details class="group rounded border p-4">
<summary class="cursor-pointer font-semibold">Show delivery status</summary>
<p class="mt-3 origin-left motion-safe:group-open:animate-fade-in">Ready for collection.</p>
</details>Class reference
| Class | CSS declarations |
|---|---|
motion-safe:animate-fade-in | animation: mono-fade-in 300ms ease-out both; |
motion-safe:transition-transform | transition-property: transform, translate, scale, rotate;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 150ms; |
motion-reduce:animate-none | animation: none; |
motion-reduce:scroll-auto | scroll-behavior: auto; |
View full generated CSS
@keyframes mono-fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@media (prefers-reduced-motion: no-preference) {
.motion-safe\:animate-fade-in {
animation: mono-fade-in 300ms ease-out both;
}
.motion-safe\:transition-transform {
transition-property: transform, translate, scale, rotate;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 150ms;
}
}
@media (prefers-reduced-motion: reduce) {
.motion-reduce\:animate-none {
animation: none;
}
.motion-reduce\:scroll-auto {
scroll-behavior: auto;
}
}