| id | string | — | |
- Name
- id
- Description
Names the toaster, so a toast can target it when a page has several. - Type
string- Default
- —
|
| invert | boolean | false | |
- Name
- invert
- Description
Inverts the toast colours: dark toasts on a light theme, light ones on a dark theme. - Type
boolean- Default
- false
|
| theme | Theme | — | |
- Name
- theme
- Description
The colour theme of the toasts; system follows the device. - Type
'light' | 'dark' | 'system'- Default
- —
|
| position | Position | — | |
- Name
- position
- Description
Where on the screen the toasts stack. - Type
'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top-center' | 'bottom-center'- Default
- —
|
| closeButtonPosition | CloseButtonPosition | — | |
- Name
- closeButtonPosition
- Description
The corner of a toast its close button sits in. - Type
'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'- Default
- —
|
| hotkey | string[] | — | |
- Name
- hotkey
- Description
The keys that move focus to the toasts, e.g. altKey with KeyT. - Type
string[]- Default
- —
|
| richColors | boolean | false | |
- Name
- richColors
- Description
Gives success, error, warning and info toasts their own colours. - Type
boolean- Default
- false
|
| expand | boolean | false | |
- Name
- expand
- Description
Shows every toast in full instead of a collapsed stack. - Type
boolean- Default
- false
|
| duration | number | — | |
- Name
- duration
- Description
How long a toast stays, in milliseconds. - Type
number- Default
- —
|
| gap | number | — | |
- Name
- gap
- Description
The space between expanded toasts, in pixels. - Type
number- Default
- —
|
| visibleToasts | number | — | |
- Name
- visibleToasts
- Description
How many toasts show at once; the rest wait their turn. - Type
number- Default
- —
|
| closeButton | boolean | false | |
- Name
- closeButton
- Description
Gives every toast a close button. - Type
boolean- Default
- false
|
| toastOptions | ToastOptions | — | |
- Name
- toastOptions
- Description
Defaults for every toast, such as its classes, styles and duration. - Type
ToastOptions- Default
- —
|
| offset | Offset | — | |
- Name
- offset
- Description
The distance from the screen edges: one value, or one per side. - Type
string | number | { top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }- Default
- —
|
| mobileOffset | Offset | — | |
- Name
- mobileOffset
- Description
The distance from the screen edges on small screens: one value, or one per side. - Type
string | number | { top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }- Default
- —
|
| dir | 'ltr' | 'rtl' | 'auto' | — | |
- Name
- dir
- Description
The text direction of the toasts. - Type
'ltr' | 'rtl' | 'auto'- Default
- —
|
| swipeDirections | SwipeDirection[] | — | |
- Name
- swipeDirections
- Description
The directions a toast can be swiped away in. - Type
SwipeDirection[]- Default
- —
|
| icons | ToastIcons | — | |
- Name
- icons
- Description
Replaces the icons of success, error, warning, info and loading toasts. - Type
ToastIcons- Default
- —
|
| containerAriaLabel | string | — | |
- Name
- containerAriaLabel
- Description
The accessible name of the region that holds the toasts. - Type
string- Default
- —
|