A saved-message toast keeps its layout but removes sliding motion when the user asks for reduced motion.

Program

Motion can help show change, but some users need less movement. A reduced-motion media query keeps the same content visible without the slide.

reduced_motion_state.html
Visuals: captured from real browser rendering
<style>
.toast { padding: 12px 16px; border-radius: 8px; background: #0f766e; color: white; }
.toast { transform: translateX(0); transition: transform 300ms ease; }
.toast.entering { transform: translateX(18px); }
@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; transform: translateX(0); }
}
</style>

<aside class="toast entering">Saved</aside>
  1. Style the toast as a visible status card.

    A saved-message toast appears as a readable teal card.
    The base style makes the status message easy to see before any motion rules.
  2. Declare the normal motion transition.

    The toast has a short transform transition marked as normal motion.
    The transition animates transform changes for users who have not reduced motion.
  3. Offset the entering toast.

    The toast is shown offset slightly to suggest a slide-in state.
    The entering class gives the normal-motion path a small movement.
  4. Listen for the reduced-motion preference.

    A reduced-motion branch is added beside the normal motion path.
    The media query lets the same component respect a user setting.
  5. Remove animation in the reduced-motion branch.

    The reduced-motion branch keeps the toast in place with no transition.
    The message still appears, but the slide is removed.
  6. Attach the classes to the status message.

    The Saved toast is complete with normal and reduced-motion states.
    One component now supports motion and reduced-motion users.
prefers-reduced-motion prefers-reduced-motion lets CSS respond to a user's motion preference.
transition A transition animates a change between two CSS values.