Toast
Overlays & Feedback
macOS Notification Center style HUD alert toasts.
Installation
$npx shadcn-macos@latest add toast
Examples
Props
<ToastProvider />| Prop | Type | Default | Description |
|---|---|---|---|
| children* | React.ReactNode | — | Application component tree. |
useToast() Hook| Prop | Type | Default | Description |
|---|---|---|---|
| toast({ title, description, type, duration }) | (options: { title: string; description?: string; type?: 'default' | 'success' | 'error' | 'warning'; duration?: number }) => void | — | Triggers a new toast notification HUD. |
| dismiss(id) | (id: string) => void | — | Dismisses an active toast by its unique ID. |