Toast

Stackable notifications with a left accent bar. Triggered from JavaScript. Auto-dismisses after a timeout of your choice.

Live demo

<div class="toast-container toast-container--top-right" role="region" aria-label="Notifications">
  <div class="toast toast--success" role="status">
    <span class="toast__icon">✓</span>
    <div class="toast__body">
      <p class="toast__title">Saved</p>
      <p class="toast__message">Your changes are live.</p>
    </div>
    <button class="toast__close" aria-label="Dismiss">×</button>
  </div>
</div>

Tones (static preview)

i

Info

An informational message.

Success

Operation completed.

!

Warning

Requires your attention.

<div class="toast toast--info"    role="status">…</div>
<div class="toast toast--success" role="status">…</div>
<div class="toast toast--warning" role="status">…</div>
<div class="toast toast--error"   role="alert">…</div>

Modifiers

ClassEffect
.toast-containerFixed container. Position via modifier below.
.toast-container--top-rightTop-right corner (default).
.toast-container--top-leftTop-left corner.
.toast-container--top-centerTop, horizontally centered.
.toast-container--bottom-rightBottom-right corner.
.toast-container--bottom-leftBottom-left corner.
.toast-container--bottom-centerBottom, horizontally centered.
.toastSingle toast.
.toast--info / --success / --warning / --errorTonal left accent bar.
.toast--dismissingTriggers exit animation before removal.
.toast__icon / __body / __title / __message / __closeSub-elements.