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

Set the readable final appearance as the base style. The status appears immediately with reduced motion enabled.

HTML
<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

ClassCSS declarations
motion-safe:animate-fade-inanimation: mono-fade-in 300ms ease-out both;
motion-safe:transition-transformtransition-property: transform, translate, scale, rotate; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;
motion-reduce:animate-noneanimation: none;
motion-reduce:scroll-autoscroll-behavior: auto;
View full generated CSS
Compiled 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;
  }
}