Skip to content

Notification center

A home for updates with read state, grouped information, and animated disclosure.

npx shadcn@latest add @silicon-ui/notification-center

Installation

With the shadcn CLI

npx shadcn@latest add @silicon-ui/notification-center

Manually

  1. Install the dependencies

    npm install @radix-ui/react-popover lucide-react motion
  2. Copy 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
  3. Add the foundation, once per app, for the design and motion tokens

    npx shadcn@latest add @silicon-ui/silicon-foundation

Usage

usage.tsx
import { NotificationCenter } from "@/components/silicon-ui/notification-center/notification-center";

API reference

PropTypeDefault
notifications*NotificationItem[]—
labelstring"Notifications"
onReadChange(notification: NotificationItem, read: boolean) => void—
onDismiss(notification: NotificationItem) => void—
openboolean—
onOpenChange(open: boolean) => void—
avoidCollisionsbooleantrue

Dependencies

npm
@radix-ui/react-popoverlucide-reactmotion
Registry
silicon-motion-tokensavatar