Skip to Content
Overlays & Dialogs@hacline/ui/toast

Toast

Present temporary dismissible notifications with optional actions.

Usage

Trigger multiple notifications to preview stacked cards, hover or focus the region to expand the stack, or click an action like Undo. Semantic helpers (success, warning, error, info) style automatically via data-type.

Click repeatedly to stack toasts

    Promise-Driven Async Status

    Use notify.promise to show a pending loading toast first and automatically update the same notification upon completion.

      Parts

      PartDescriptionExtended Props
      Toast
      One toast. Swipe it toward the region's side, or press Escape on it, to dismiss it.
      variant
      ToastAction
      The toast's action, like Undo. Renders the toast's action label when it has no children, as a link when the action has an href. A Promise from its handler keeps the toast open and the button pending.—
      ToastClose
      Closes the toast. With an action, runs it first, and a returned Promise keeps the toast open until it settles.—
      ToastDescription
      The toast's description. Renders the toast's description when it has no children, and nothing when it has neither.—
      ToastTitle
      The toast's title. Renders the toast's title when it has no children, and nothing when it has neither.—

      Props

      Prop

      Type

      View UI SDK parts and state attributes.