bit Bheadless

Toast

Short, non-blocking notifications โ€” queued from anywhere, announced to screen readers, dismissed automatically.

Implementation: CSS Tailwind

Simple toast

Inject BitBhToaster and call Show. The BitBhToastViewport is a "Notifications (F8)" landmark โ€” press F8 to reach it. Toasts are announced automatically, pause while hovered or focused, and enter / exit with starting: and data-state-closed: transitions (the exit is awaited).

With a description

BitBhToastDescription renders the description; title and description are announced together. Data carries a variant for the template (data-[variant=success]:).

With an action

ActionLabel + OnAction power BitBhToastAction, which runs the callback and dismisses the toast. Keep the action reachable elsewhere too ("Restore all").

  • Quarterly report
  • Team offsite plan
  • Invoice #1042

Foreground (assertive) error

Foreground = true announces assertively (role="alert") and sets data-type="foreground". Use it for the direct result of a user action that needs attention.

Custom duration and persistent toasts

Duration (ms) overrides the viewport default; Duration = 0 keeps the toast until dismissed. Clear() dismisses everything.

Stacking with Limit

A page-owned toaster with Limit = 3 (the oldest is dropped beyond that) feeds a second viewport via Toaster (bottom-left, Shift+F8). Toasts overlap in one grid cell and fan out on hover or focus.

Shown: 0 of max 3
      An unhandled error has occurred. Reload ๐Ÿ—™