Toast
Brief confirmation for a completed background action.
A persistent message that helps people recover or continue.
npx shadcn@latest add @silicon-ui/alertnpx shadcn@latest add @silicon-ui/alertInstall the dependencies.
npm install lucide-react motionCopy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/alert/alert.tsxcomponents/silicon-ui/alert/alert.module.cssInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
| Prop | Type | Default |
|---|---|---|
title* | string | — |
tone | AlertTone
| — |
children | ReactNode | — |
openControls presence. Hiding the alert collapses its height and fades it out. | boolean | — |
onDismissShows a dismiss button. An uncontrolled alert collapses first, then calls this. | () => void | — |
Also accepts the props of HTMLAttributes<HTMLDivElement>.