Toast

Brief confirmation for a completed background action.

npx shadcn@latest add @silicon-ui/toast
statusmessage
Loading…

Installation

With the shadcn CLI

npx shadcn@latest add @silicon-ui/toast

Manually

  1. Install the dependencies.

    npm install lucide-react motion
  2. Copy these files into your project. Shared files are skipped if you already have them.

    • components/silicon-ui/toast/toast.tsx
    • components/silicon-ui/toast/toast.module.css
  3. Install the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation

Usage

Source codetsx
import Toast from "@/components/silicon-ui/toast/toast";

API reference

PropTypeDefault
title*string—
descriptionstring—
openbooleantrue
onOpenChange(open: boolean) => void—
durationnumber4500

Dependencies

npm
lucide-reactmotion
Registry
silicon-motion-tokens