- Docs
- Components
- Toast
Toast
A succinct message that is displayed temporarily.
Preview
Code
Installation
CLI
Manual
Anatomy
Examples
With Description
Preview
Code
Status
Preview
Code
Promise
Preview
Code
Custom
Preview
Code
API Reference
Toaster
The Toaster component should be placed once in your app's root layout or providers.
| Prop | Type | Default |
|---|---|---|
position | enum | "bottom-right" |
expand | boolean | false |
duration | number | 4000 |
visibleToasts | number | 3 |
closeButton | boolean | false |
richColors | boolean | false |
theme | enum | "system" |
offset | string | number | |
dir | enum | "ltr" |
toast()
The toast() function is used to create toasts programmatically.
| Prop | Type | Default |
|---|---|---|
message | string | ReactNode | |
description | string | ReactNode | |
duration | number | |
icon | ReactNode | |
action | object | |
cancel | object | |
onDismiss | function | |
onAutoClose | function |