Toast
Usage
A transient confirmation that appears bottom-right and dismisses itself. Use it for the outcome of an action the user just took, where the result does not need to persist. Anything the user must act on belongs in an Alert next to the thing it concerns — a toast that disappears before it is read has told nobody anything.import { ToastProvider, useToast } from '@summonware/ui';Best practices
DoMount ToastProvider once, high in the tree. `useToast` throws outside it rather than failing silently.
DoKeep the title to a few words and put detail in the description.
Don'tDeliver errors that need a decision by toast. The stack is `aria-live="polite"`, so it will not interrupt, and it will vanish.
Don'tFire several at once for one action. Summarise instead.
Anatomy
ToastProvider *Owns the queue and renders the fixed bottom-right stack.
useToast().push *Enqueues a message. Returns nothing — toasts are fire-and-forget.
Examples
Common configurations, variations and states.Tones
Each button enqueues a toast. They stack upward and expire independently after four seconds.