Toaster
Shows brief, non-intrusive notifications to inform users of actions, errors, or system feedback.
Installation
Usage
API
Separator Props
For Toaster Main
| Attribute | Type | Description | Default |
|---|---|---|---|
| children | ReactNode | ReactNode[] | Wraps the application and provides toast context. Required for using Toaster.Trigger or useToast hook. | - |
For Toaster Trigger
| Attribute | Type | Description | Default |
|---|---|---|---|
| children | ReactNode | Content rendered inside the trigger button. | - |
| message | string | Message text displayed inside the toast notification. | - |
| toastType | "success" | "error" | "info" | "warning" | Controls the visual style and icon of the toast. | "info" |
| position | "top-right" | "top-left" | "bottom-right" | "bottom-left" | Defines where the toast appears on the screen. | "top-right" |
| duration | number | Time in milliseconds before the toast automatically disappears. | 3000 |
| className | string | Additional CSS classes to customize the trigger button styling. | - |
Examples
Default
Warning
Success
Danger
Credits
This component is inspired by Rehman Kalawant Design Shared On Github.