UI Component Lab 日本語

← All components

Feedback

Toast

A brief message that pops up at the edge of the screen after an action and disappears on its own.

Demo

Also known as

  • Snackbar — MUI

How to recognize it

A small dark or colored box floating near the bottom or top of the screen, with one line of text and sometimes a close or undo button.

Behavior

  • Appears after an action, such as “Message archived”, without moving focus.
  • It is announced through a live region (role="status") that is already on the page before the message is added.
  • Disappears after a few seconds (5 seconds in this demo). Toasts with buttons should not disappear by themselves, because keyboard users may not reach them in time.
  • Important information, such as form errors, belongs in an alert rather than a toast.

Keyboard

KeyAction
Enter / SpaceRuns the action that shows the toast.
EscDismisses the toast.
  • Alert: A toast floats over the page and disappears on its own; an alert stays in the page content until the problem is fixed.

Sources