Toast
Brief, non-blocking messages with an imperative API callable from anywhere.
- Feedback
- 2 files
- 2 npm packages
- Accessibility notes
pnpm dlx @dowel-ui/cli add toastnpm packages installed: class-variance-authority, radix-ui.
import { ToastProvider } from "@/components/ui/toast";Default
Variants
With Description
With Action
Persistent
Promise
Stacking
Spring
<Toast>
| Prop | Type | Default |
|---|---|---|
animationHow the toast enters. | "default" | "spring" | "default" |
variant | "default" | "success" | "warning" | "destructive" | "info" | "default" |
Every prop of Radix UI’s Toast.Root, plus className.
<ToastTitle>
Every prop of Radix UI’s Toast.Title, plus className.
<ToastDescription>
Every prop of Radix UI’s Toast.Description, plus className.
<ToastAction>
Every prop of Radix UI’s Toast.Action, plus className.
<ToastClose>
Every prop of Radix UI’s Toast.Close, plus className.
<Toaster>
| Prop | Type | Default |
|---|---|---|
animationHow toasts enter. See | "default" | "spring" | "default" |
durationDefault auto-dismiss in ms. Individual toasts may override it. | number | DEFAULT_TOAST_DURATION |
labelNames the toast region for assistive technology. | string | "Notifications" |
position | ToastPosition | "bottom-right" |
className | string | — |
8/8
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — does not apply
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — passes
- className merged — passes
- Visible focus — does not apply
- No fixed widths — passes