Components · Notifications

Toast

A toast is short-lived feedback on something the user just did: saved, copied, failed. It slides in, says its piece and leaves without blocking the page.

Tokens, sizes, measurements, states and requirements. Values come from the live token package and from System Toast.

Design Tokens

Resolved from the live token package.

Status · emphasisPartTokenValue

Sizes

Dimensions

PropertyValue
Width375px from 640px. Below 640px the full viewport width.
Padding16px, with 8px between icon and text
Left edge2px solid, status color
Shadowvar(--shadow-elevation-b-80)
Actionable footerIndent 32px, 16px above the buttons, buttons 32px high, Primary fills the rest of the row. Or inline links, 16px gap between them. Buttons and links are alternatives.
Z-index9999

Position

The toast is position: fixed and always enters from the right, except on mobile where it enters from the top.

BreakpointTopRightWidthEnters from
lg (1024px+)40px40px375pxThe right
md (769–1023px)32px32px375pxThe right
sm (640–768px)32px32px375pxThe right
xs (0–639px)00 (left 0)Full viewport widthThe top

Measurements

Dimensions

The padding of the toast. The shaded area is the padding; the 2px status edge sits outside it. The numbers are read from the component. A toast is the same at every breakpoint.

An Informational toast at true size.
AttributeValue
Padding16px on every side
Left edge2px, outside the padding
Gap icon to text8px
Gap between title and text2px
Close24px box, 20px icon, 2px padding

Spacing

The same distances as spacing tokens.

PartValue
Paddingspace-16
Icon to textspace-8
Title to textspace-2
Left edgespace-2
Actions indentspace-32
Text to actionsspace-16
Between buttonsspace-8
Between linksspace-8 row, space-16 column

Elevation

PartTokenValue
Toastshadow-elevation-b-80The highest bottom shadow: the toast floats above everything except a modal.

States

Every status in both emphasis levels. A toast has no hover or disabled state of its own: the ×, the buttons and the links have. Its lifecycle (enter, visible, exit) is under Motion.

Layout
Breakpoint
StatusStrongWeak

Typography

ElementTokenMobile and tabletDesktop (769px+)
Title (optional)title-sm16/18, bold16/18, bold
Textbody-md16/22, 0.32px17/24, 0.32px
Buttonslabel-md / label-sm14/14, 0.42px14/14, 0.56px
Inline linkbody-md16/2217/24

Structure

Elements

ElementClassNotes
Toasttoast toast--{status} toast--{emphasis}Status: info, success, warning, error. Emphasis: strong, weak.
Contenttoast__inner, toast__row, toast__bodyPadding, edge and the icon / text / × row.
Icon, title, texttoast__icon, toast__title, toast__textThe icon is a material-symbols-outlined span.
Closeicon-btn icon-btn--closeBlank icon button, aria-label="Close".
Actionstoast__actions with toast__btns or toast__linksButtons or inline links.
Positiontoast-hostAdded by ECO_N.showToast; fixed, role="status".

Types

Eight combinations: four statuses × Strong and Weak, each Default or Actionable.

Width

375px from 640px, the full width below. Never wider than the window.


Motion

MotionValue
Durationvar(--duration-medium-2) (300ms) enter and exit; no fade, the toast only slides
Enter easingvar(--ease-decelerate-emphasized) (cubic-bezier(0.16, 0, 0.16, 1))
Exit easingvar(--ease-accelerate-generic) (cubic-bezier(0.36, 0.09, 1, 0.58))
Auto-hide4000ms for System Toast
Reduced motionThe toast appears and leaves without sliding

Compare other easing and duration values in the live Motion section on Examples & Guidelines.


Behavior

InputResult
Click ×Runs the exit animation, then removes the toast.
Click outsideSame. The listener starts on the next tick so the click that opened the toast does not close it.
WaitAuto-hide after 4 seconds (Success and Informational). Warning and Error stay until dismissed.
TabThe × and any button or link take focus with a visible ring.
Inline linkUnderlined when enabled; on hover the underline goes and the color changes (eco-inline-link, Medium).
Second toastReplaces the first one at once. Only one toast is on screen.

Accessibility Requirements

TopicRequirement
AnnouncementThe toast area is role="status" with aria-live="polite", so new toasts are announced without moving focus (WCAG 4.1.3).
StatusThe icon and the text carry the status, not the color alone (WCAG 1.4.1).
FocusThe ×, buttons and links have a 2px ring, border-focus, on keyboard use (WCAG 2.4.7).
TimingSuccess and Informational leave after 4 seconds; Warning and Error stay until dismissed. Anything the user must act on does not auto-hide (WCAG 2.2.1).
Reduced motionNo slide under prefers-reduced-motion: reduce.