

Every state


default


starting


done


failed


cancelled


focus
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "toast-progress" | unique on the page; the title and bar ids hang off it. |
| title | string | "Exporting orders" | what is running, e.g. "Exporting orders". |
| fileName | string | "orders-november.csv" | File name. |
| total | number | 1240 | how many items the task handles; the meta line counts them. |
| unit | string | "orders" | what the items are called, e.g. "orders". |
| doneTitle | string | "Export ready" | Done title. |
| failedTitle | string | "Export failed" | Failed title. |
| failedMessage | string | "The connection dropped. No file was created." | Failed message. |
| cancelledTitle | string | "Export cancelled" | Cancelled title. |
| downloadHref | string | "#download" | Download href. |
| task | (report: (value: number) => void, signal: AbortSignal) => Promise<void> | simulateExport | the work itself: call report(0–100) as it goes and stop when signal aborts; reject to fail. |
| onCancel | () => void | – | On cancel. |
| onDone | () => void | – | On done. |
| defaultStatus | ToastProgressStatus | "running" | where the toast starts; "running" starts the task. |
| defaultValue | number | 0 | percentage already done when the toast opens. |
| 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. |
| inline | boolean | false | draws the toast in place instead of in the fixed bottom-right viewport. |
| locale | string | "en-GB" | Locale. |
| className | string | – | Class name. |
More toasts
All 7toast-02 is in UI ProGet UI Pro, €199


