Snackbar
Bottom snackbar with an action button; the countdown pauses on hover or focus.
Copy a prompt for your AI coding tool with the source, dependencies and usage
Props
SnackbarProps
Also accepts all props of Omit<React.ComponentProps<"div">, "children">
| Prop | Type | Default | Description |
|---|---|---|---|
| open* required | boolean | — | — |
| onOpenChange* required | (open: boolean) => void | — | — |
| message* required | React.ReactNode | — | — |
| actionLabel | string | — | — |
| onAction | () => void | — | — |
| duration | number | 5000 | Auto-dismiss delay in ms, 0 keeps it open |
Install
$ npx shadcn@latest add https://chromotion.dev/r/snackbar.json