{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "notifications-1",
  "title": "Notifications Sheet Panel",
  "description": "Notifications sheet opened from a bell trigger, with icon tiles, unread highlighting, timestamps, an unread count, and a mark all read action.",
  "dependencies": [
    "@base-ui/react"
  ],
  "registryDependencies": [
    "button",
    "scroll-area",
    "separator",
    "sheet"
  ],
  "files": [
    {
      "path": "registry/blocks/notifications/1/notifications-block.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Button } from \"@/components/ui/button\"\nimport { ScrollArea } from \"@/components/ui/scroll-area\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n  Sheet,\n  SheetClose,\n  SheetContent,\n  SheetHeader,\n  SheetTitle,\n  SheetTrigger,\n} from \"@/components/ui/sheet\"\nimport { cn } from \"@/lib/utils\"\nimport { IconPlaceholder } from \"@/components/icons/icon-placeholder\"\n\ntype IconProps = { className?: string; size?: number | string }\n\nconst initialNotifications = [\n  {\n    id: 1,\n    icon: (p: IconProps) => (\n      <IconPlaceholder\n        lucide=\"UserPlus\"\n        tabler=\"IconUserPlus\"\n        hugeicons=\"UserAddIcon\"\n        phosphor=\"UserPlus\"\n        remixicon=\"RiUserAddLine\"\n        {...p}\n      />\n    ),\n    title: \"New team member joined\",\n    body: \"Sarah Chen accepted your invitation and joined the workspace.\",\n    timestamp: \"2 Min Ago\",\n    unread: true,\n  },\n  {\n    id: 2,\n    icon: (p: IconProps) => (\n      <IconPlaceholder\n        lucide=\"GitMerge\"\n        tabler=\"IconGitMerge\"\n        hugeicons=\"GitMergeIcon\"\n        phosphor=\"GitMerge\"\n        remixicon=\"RiGitMergeLine\"\n        {...p}\n      />\n    ),\n    title: \"Pull request merged\",\n    body: \"feat/dashboard-v2 was merged into main by Jordan Lee.\",\n    timestamp: \"14 Min Ago\",\n    unread: true,\n  },\n  {\n    id: 3,\n    icon: (p: IconProps) => (\n      <IconPlaceholder\n        lucide=\"CircleAlert\"\n        tabler=\"IconAlertCircle\"\n        hugeicons=\"AlertCircleIcon\"\n        phosphor=\"WarningCircle\"\n        remixicon=\"RiErrorWarningLine\"\n        {...p}\n      />\n    ),\n    title: \"Usage limit warning\",\n    body: \"Your team has used 85% of the monthly API quota.\",\n    timestamp: \"1 Hour Ago\",\n    unread: true,\n  },\n  {\n    id: 4,\n    icon: (p: IconProps) => (\n      <IconPlaceholder\n        lucide=\"FileText\"\n        tabler=\"IconFileText\"\n        hugeicons=\"File01Icon\"\n        phosphor=\"FileText\"\n        remixicon=\"RiFileTextLine\"\n        {...p}\n      />\n    ),\n    title: \"Invoice generated\",\n    body: \"Invoice #INV-2024-0118 for $1,240.00 is ready to download.\",\n    timestamp: \"3 Hours Ago\",\n    unread: false,\n  },\n  {\n    id: 5,\n    icon: (p: IconProps) => (\n      <IconPlaceholder\n        lucide=\"ShieldCheck\"\n        tabler=\"IconShieldCheck\"\n        hugeicons=\"Shield01Icon\"\n        phosphor=\"ShieldCheck\"\n        remixicon=\"RiShieldCheckLine\"\n        {...p}\n      />\n    ),\n    title: \"Security scan complete\",\n    body: \"Weekly vulnerability scan finished, no critical issues found.\",\n    timestamp: \"Yesterday\",\n    unread: false,\n  },\n  {\n    id: 6,\n    icon: (p: IconProps) => (\n      <IconPlaceholder\n        lucide=\"Megaphone\"\n        tabler=\"IconSpeakerphone\"\n        hugeicons=\"MegaphoneIcon\"\n        phosphor=\"Megaphone\"\n        remixicon=\"RiMegaphoneLine\"\n        {...p}\n      />\n    ),\n    title: \"Scheduled maintenance\",\n    body: \"Planned downtime on Dec 22 from 02:00–04:00 UTC.\",\n    timestamp: \"2 Days Ago\",\n    unread: false,\n  },\n  {\n    id: 7,\n    icon: (p: IconProps) => (\n      <IconPlaceholder\n        lucide=\"Check\"\n        tabler=\"IconCheck\"\n        hugeicons=\"Tick02Icon\"\n        phosphor=\"Check\"\n        remixicon=\"RiCheckLine\"\n        {...p}\n      />\n    ),\n    title: \"Deployment succeeded\",\n    body: \"Production deploy v3.14.2 completed without errors.\",\n    timestamp: \"3 Days Ago\",\n    unread: false,\n  },\n]\n\nexport default function NotificationsBlock() {\n  const [notifications, setNotifications] = React.useState(initialNotifications)\n  const unreadCount = notifications.filter((n) => n.unread).length\n\n  const markAllRead = () =>\n    setNotifications((prev) => prev.map((n) => ({ ...n, unread: false })))\n\n  return (\n    <section className=\"flex w-full items-center justify-center bg-background px-6 py-12 text-foreground\">\n      <Sheet defaultOpen>\n        <SheetTrigger\n          render={<Button variant=\"outline\" size=\"icon\" />}\n          aria-label=\"Open notifications\"\n        >\n          <IconPlaceholder\n            lucide=\"Bell\"\n            tabler=\"IconBell\"\n            hugeicons=\"BellIcon\"\n            phosphor=\"Bell\"\n            remixicon=\"RiBellLine\"\n            className=\"size-4\"\n            aria-hidden=\"true\"\n          />\n        </SheetTrigger>\n\n        <SheetContent side=\"right\" className=\"w-full p-0 sm:max-w-md\">\n          <SheetHeader className=\"flex-row items-center gap-2 space-y-0 pr-12\">\n            <SheetTitle className=\"flex items-center gap-2\">\n              Notifications\n              {unreadCount > 0 && (\n                <span className=\"flex size-5 items-center justify-center rounded-4xl bg-primary text-[10px] font-semibold text-primary-foreground\">\n                  {unreadCount}\n                </span>\n              )}\n            </SheetTitle>\n          </SheetHeader>\n\n          <Separator />\n\n          <ScrollArea className=\"flex-1 [&_[data-slot=scroll-area-viewport]]:scroll-fade-y\">\n            <ul className=\"flex flex-col\">\n              {notifications.map((item, index) => {\n                const Icon = item.icon\n                return (\n                  <li key={item.id}>\n                    <div\n                      className={cn(\n                        \"flex items-start gap-3 px-4 py-3 transition-colors hover:bg-muted/50\",\n                        item.unread && \"bg-muted/30\"\n                      )}\n                    >\n                      <span\n                        className={cn(\n                          \"mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-md bg-muted text-muted-foreground\",\n                          item.unread && \"bg-primary/10 text-primary\"\n                        )}\n                      >\n                        <Icon className=\"size-4\" aria-hidden=\"true\" />\n                      </span>\n\n                      <div className=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n                        <div className=\"flex items-start justify-between gap-2\">\n                          <span\n                            className={cn(\n                              \"truncate text-xs font-medium\",\n                              item.unread\n                                ? \"text-foreground\"\n                                : \"text-muted-foreground\"\n                            )}\n                          >\n                            {item.title}\n                          </span>\n                          <span className=\"shrink-0 text-[10px] text-muted-foreground\">\n                            {item.timestamp}\n                          </span>\n                        </div>\n                        <p className=\"text-xs/relaxed text-muted-foreground\">\n                          {item.body}\n                        </p>\n                      </div>\n\n                      {item.unread && (\n                        <span\n                          className=\"mt-1.5 size-1.5 shrink-0 bg-primary\"\n                          role=\"img\"\n                          aria-label=\"Unread\"\n                        />\n                      )}\n                    </div>\n                    {index < notifications.length - 1 && <Separator />}\n                  </li>\n                )\n              })}\n            </ul>\n          </ScrollArea>\n\n          <Separator />\n\n          <div className=\"flex gap-2 p-3\">\n            <SheetClose\n              render={<Button variant=\"outline\" size=\"sm\" className=\"flex-1\" />}\n            >\n              Close\n            </SheetClose>\n            <Button\n              size=\"sm\"\n              className=\"flex-1\"\n              onClick={markAllRead}\n              disabled={unreadCount === 0}\n            >\n              <IconPlaceholder\n                lucide=\"Check\"\n                tabler=\"IconCheck\"\n                hugeicons=\"Tick02Icon\"\n                phosphor=\"Check\"\n                remixicon=\"RiCheckLine\"\n                data-icon=\"inline-start\"\n              />\n              Mark All Read\n            </Button>\n          </div>\n        </SheetContent>\n      </Sheet>\n    </section>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/blocks/notifications-1.tsx"
    }
  ],
  "meta": {
    "height": "675px",
    "tier": "free"
  },
  "docs": "Requires a `base-*` style in components.json (the `shadcn init` default). Legacy `new-york`/`radix-*` styles install Radix primitives, which reject the `render` prop this block uses.",
  "categories": [
    "notifications"
  ],
  "type": "registry:block"
}