Toast
Stripe ToastStripe's toast: a compact dark bar centred at the bottom, one line of at most 30 characters. success, caution or pending (a spinner that stays until you update it). It leaves after 4 seconds, 6 with an action. Name the thing and repeat the button's verb: “Add person” → “Person added”. KitProvider mounts the Toaster for you.
Types
When to use
- Confirming an action whose result is also visible on the page.
Not for
- A server's reason — show it in a Banner.
- Secrets — a warning Banner with Copy.
Props
| Prop | Type | Description |
|---|---|---|
| message | string | 1–30 characters, never empty. |
| type | "success" | "caution" | "pending" | Omit for a plain note. |
| action / onAction | string / () => void | One action, such as Retry. |
| returns | { update(message, options), dismiss() } | Turn a pending toast into success or caution. |