Notification center
A home for updates with read state, grouped information, and animated disclosure.
npx shadcn@latest add @silicon-ui/notification-centerInstallation
With the shadcn CLI
npx shadcn@latest add @silicon-ui/notification-centerManually
Install the dependencies
npm install @radix-ui/react-popover lucide-react motionCopy these files into your project
- components/silicon-ui/notification-center/notification-center.tsx
- components/silicon-ui/notification-center/notification-center.module.css
Shared with other components. Skip any you already have.
- components/silicon-ui/avatar/avatar.tsx
- components/silicon-ui/avatar/avatar.module.css
- components/silicon-ui/lib/silicon-provider.tsx
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 |
|---|---|---|
notifications* | NotificationItem[] | — |
label | string | "Notifications" |
onReadChange | (notification: NotificationItem, read: boolean) => void | — |
onDismiss | (notification: NotificationItem) => void | — |
open | boolean | — |
onOpenChange | (open: boolean) => void | — |
avoidCollisions | boolean | true |