Skip to content

Toaster ​

Notifications

Short confirmations that come and go — saved, copied, sent. Nothing only in a toast should be needed later; errors people must act on belong in the page or an Alert.

Basic

Undo over confirm: if an action can be reversed, do it and offer the way back.

Undo
  • plot.md
  • route-a.md
  • route-b.md
  • Mount one BlessToaster; call useToast() anywhere. Toasts are announced politely; danger ones interrupt.
  • Timers pause while the pointer or keyboard focus is in the toaster, so an action button doesn't vanish mid-reach; duration: 0 keeps one until dismissed.
  • action adds one button; position picks the corner; label names the region.

Usage ​

ts
import { BlessToaster } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
position"top-right" | "top-left" | "bottom-right" | "bottom-left" | "top-center" | "bottom-center""bottom-right"
closeLabelstring"Dismiss"
labelstring"Notifications"the region's name

Released under the MIT License. Character names and artwork belong to their owners.