Toast
A concise, temporary message.
Usage
First of all, you need to import the useToasts
hook from the kitchn
package.
import { useToasts } from "kitchn"
Default
Multiline
With JSX
Action
Cancel
Types
Props
Name | Type | Default | Required | Description | Accepted values |
---|---|---|---|---|---|
text | JSX.Element | string | - | - | The content displayed in the toast. | - |
delay | number | 3000 | - | The delay (in milliseconds) before the toast closes. | - |
actions | ToastInput.actions?: ToastAction[] | - | - | The default action of the toast. | - |
type | string | primary | - | The type of the toast. | primary , secondary , info , success , warning , danger |