Toast
Brief confirmation for a completed background action.
npx shadcn@latest add @silicon-ui/toastInstallation
With the shadcn CLI
npx shadcn@latest add @silicon-ui/toastManually
Install the dependencies
npm install lucide-react motionCopy these files into your project
- components/silicon-ui/toast/toast.tsx
- components/silicon-ui/toast/toast.module.css
Add the foundation, once per app, for the design and motion tokens
npx shadcn@latest add @silicon-ui/silicon-foundation
Usage
API reference
| Prop | Type | Default |
|---|---|---|
title* | string | — |
description | string | — |
open | boolean | true |
onOpenChange | (open: boolean) => void | — |
duration | number | 4500 |
Dependencies
- npm
- lucide-reactmotion
- Registry
- silicon-motion-tokens