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.dangerones interrupt. - Timers pause while the pointer or keyboard focus is in the toaster, so an action button does not vanish mid-reach.
duration: 0keeps one until dismissed. actionadds one button.positionpicks the corner.labelnames the region.
Usage
ts
import { BlessToaster } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
position | "top-end" | "top-start" | "bottom-end" | "bottom-start" | "top-center" | "bottom-center" | "bottom-end" | |
label | string | "Notifications" | the region's name |
labels | Partial<{ close: string; }> | — |