Skip to content
Calm motion: animations on this site only fade, with no movement

Toaster ​

Notifications

Short confirmations that come and go: saved, copied, sent. Nothing that exists only in a toast can be needed later. Errors that people must act on belong in the page or in 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 does not 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-end" | "top-start" | "bottom-end" | "bottom-start" | "top-center" | "bottom-center""bottom-end"
labelstring"Notifications"the region's name
labelsPartial<{ close: string; }>—

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