Toast
Brief, auto-dismissing notifications that provide feedback on user actions. Built on Radix UI Toast.
$cookest-ui add toast
Toast Variants
Trigger toasts from anywhere — they stack and auto-dismiss after 5 seconds.
| Prop | Type | Default | Description |
|---|---|---|---|
useToast | Hook | — | Returns a toast() function to trigger toasts. |
title | string | — | Main toast heading. |
description | string | — | Supporting message text. |
variant | "default" | "destructive" | "default" | Toast visual variant. |
action | ReactNode | — | Optional action button (use ToastAction component). |
duration | number | 5000 | Auto-dismiss delay in milliseconds. |