Toast

Messages stacked in a corner of the screen. Kobalte's Toast renders each message as li role="status", which takes the same styling as an alert.

alpha The class names and states here are stable. The look is not: these styles can change in a minor release, without a major version bump.

ClassDoes what
toastThe fixed stack in the corner
toast-titleA bold first line inside a message
toast-descriptionMuted body text inside a message

Basic

The stack is shown in place here rather than fixed to the corner.

<ul class="toast" style="position: static; max-width: 22rem">
  <li class="alert">
    <span>
      <span class="toast-title">Saved</span><br />
      <span class="toast-description">Your changes are live.</span>
    </span>
  </li>
  <li class="alert alert-error">
    <span>
      <span class="toast-title">Upload failed</span><br />
      <span class="toast-description">We could not reach the server.</span>
    </span>
  </li>
</ul>

Toast.Region is role="region", which accordion panels and page landmarks also use, so the stack takes .toast by hand. The messages inside it need no classes.