Toast
The Toast component is used to show Alert.
1. Import
KUMUI exports 2 Toast-related components:
import { Button,
Toaster,
useToast, } from "@rohitgadekar/kimui";
2. Usage
3. API
3.1 useToast
| Attribute | Type | Description | Default |
|---|---|---|---|
| toast | Function | A function that triggers a toast notification. Pass in the properties for the toast message like title, description, action, etc. | - |
3.2 Toaster
| Attribute | Type | Description | Default |
|---|---|---|---|
| children | React.ReactNode | The container for displaying toast notifications. You must include this component in your app layout to render the toasts. | - |