Dot Toast
Put a DotToaster on the page once, then call toast("Saved"), toast.success, toast.error, toast.loading or toast.promise from anywhere. Each note has a dot icon (a check, a cross, an i, or a ring that spins while it loads) and a row of dots along its foot that runs out as its time does. Hovering or focusing the stack holds them all; swipe one aside to send it away. A promise's note turns to success or error when it settles, and errors are announced at once.
Needs: None. Canvas 2D.
Customize
position
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| position | "bottom-right" | "bottom-left" | "bottom-center" | "top-right" | "top-left" | "top-center" | "bottom-right" | Which corner (or edge) they stack in. |
| max | number | 3 | How many show at once; older ones go to make room. |
| className | string | – | Class on the stack. |
| style | CSSProperties | – | Style on the stack, e.g. position: absolute to keep it inside a box. |