

Every state


default


details-open


retrying


failed-again


success


focus
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "toast-error" | unique on the page; the title, message and details ids hang off it. |
| title | string | "Payment didn’t go through" | Title. |
| message | string | "The bank didn’t answer in time. You weren’t charged." | what happened and what it means for the user, in one line. |
| code | string | "PAY-4021" | the error code support asks for, shown under Details. |
| reference | string | "req_8f2c1a90" | a request or trace id, shown under Details. |
| retryLabel | string | "Retry" | Retry label. |
| onRetry | () => Promise<void> | void | simulateRetry | tries again; reject to keep the error, resolve to show the success line. |
| successTitle | string | "Payment sent" | Success title. |
| successMessage | string | "€48.00 to Harbour Studio. The receipt is in your email." | Success message. |
| open | boolean | – | controlled open state; leave it out to let the toast manage itself. |
| defaultOpen | boolean | true | Default open. |
| onOpenChange | (open: boolean) => void | – | On open change. |
| defaultDetailsOpen | boolean | false | Details starts unfolded. |
| inline | boolean | false | draws the toast in place instead of in the fixed bottom-right viewport. |
| className | string | – | Class name. |
More toasts
All 7toast-01 is in UI ProGet UI Pro, €199


