{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "sidebar-1",
  "title": "Dashboard Rail With Stats",
  "description": "App layout with a collapsible icon sidebar of grouped navigation beside a dashboard inset of stat tiles and a project listing.",
  "dependencies": [
    "@base-ui/react"
  ],
  "registryDependencies": [
    "avatar",
    "button",
    "dropdown-menu",
    "input",
    "sidebar"
  ],
  "files": [
    {
      "path": "registry/blocks/sidebar/1/sidebar-block.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\nimport { Button } from \"@/components/ui/button\"\nimport {\n  DropdownMenu,\n  DropdownMenuContent,\n  DropdownMenuItem,\n  DropdownMenuSeparator,\n  DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\"\nimport { Input } from \"@/components/ui/input\"\nimport {\n  Sidebar,\n  SidebarContent,\n  SidebarFooter,\n  SidebarGroup,\n  SidebarGroupContent,\n  SidebarGroupLabel,\n  SidebarHeader,\n  SidebarInset,\n  SidebarMenu,\n  SidebarMenuBadge,\n  SidebarMenuButton,\n  SidebarMenuItem,\n  SidebarProvider,\n  SidebarTrigger,\n} from \"@/components/ui/sidebar\"\nimport { IconPlaceholder } from \"@/components/icons/icon-placeholder\"\n\ntype IconProps = { className?: string; size?: number | string }\n\nconst mainNav = [\n  {\n    label: \"Home\",\n    icon: (p: IconProps) => (\n      <IconPlaceholder\n        lucide=\"Home\"\n        tabler=\"IconHome\"\n        hugeicons=\"HomeIcon\"\n        phosphor=\"House\"\n        remixicon=\"RiHome5Line\"\n        {...p}\n      />\n    ),\n    active: false,\n  },\n  {\n    label: \"Dashboard\",\n    icon: (p: IconProps) => (\n      <IconPlaceholder\n        lucide=\"LayoutDashboard\"\n        tabler=\"IconDashboard\"\n        hugeicons=\"DashboardSquare01Icon\"\n        phosphor=\"SquaresFour\"\n        remixicon=\"RiDashboardLine\"\n        {...p}\n      />\n    ),\n    active: true,\n  },\n  {\n    label: \"Analytics\",\n    icon: (p: IconProps) => (\n      <IconPlaceholder\n        lucide=\"ChartBar\"\n        tabler=\"IconChartBar\"\n        hugeicons=\"BarChartIcon\"\n        phosphor=\"ChartBar\"\n        remixicon=\"RiBarChartBoxLine\"\n        {...p}\n      />\n    ),\n    active: false,\n  },\n  {\n    label: \"Projects\",\n    icon: (p: IconProps) => (\n      <IconPlaceholder\n        lucide=\"Folder\"\n        tabler=\"IconFolder\"\n        hugeicons=\"FolderIcon\"\n        phosphor=\"Folder\"\n        remixicon=\"RiFolderLine\"\n        {...p}\n      />\n    ),\n    active: false,\n    badge: \"4\",\n  },\n]\n\nconst workspaceNav = [\n  {\n    label: \"Team\",\n    icon: (p: IconProps) => (\n      <IconPlaceholder\n        lucide=\"Users\"\n        tabler=\"IconUsersGroup\"\n        hugeicons=\"UserGroupIcon\"\n        phosphor=\"UsersThree\"\n        remixicon=\"RiTeamLine\"\n        {...p}\n      />\n    ),\n  },\n  {\n    label: \"Settings\",\n    icon: (p: IconProps) => (\n      <IconPlaceholder\n        lucide=\"Settings\"\n        tabler=\"IconSettings\"\n        hugeicons=\"SettingsIcon\"\n        phosphor=\"GearSix\"\n        remixicon=\"RiSettings3Line\"\n        {...p}\n      />\n    ),\n  },\n]\n\nconst stats = [\n  {\n    label: \"Open Tasks\",\n    value: \"24\",\n    delta: \"+3\",\n    up: true,\n    note: \"Vs. Last Week\",\n  },\n  {\n    label: \"Deployments\",\n    value: \"11\",\n    delta: \"-2\",\n    up: false,\n    note: \"Vs. Last Week\",\n  },\n  {\n    label: \"Team Members\",\n    value: \"8\",\n    delta: \"+1\",\n    up: true,\n    note: \"New This Month\",\n  },\n  {\n    label: \"Uptime\",\n    value: \"99.9%\",\n    delta: \"+0.1%\",\n    up: true,\n    note: \"30-Day Average\",\n  },\n]\n\nconst recentActivity = [\n  {\n    user: \"Marcus Holt\",\n    initials: \"MH\",\n    avatar: \"https://i.pravatar.cc/150?img=13\",\n    action: \"Merged pull request\",\n    target: \"feat/auth-refresh\",\n    time: \"2 Min Ago\",\n    done: true,\n  },\n  {\n    user: \"Priya Nair\",\n    initials: \"PN\",\n    avatar: \"https://i.pravatar.cc/150?img=45\",\n    action: \"Opened issue\",\n    target: \"Dashboard: chart overflow on mobile\",\n    time: \"14 Min Ago\",\n    done: false,\n  },\n  {\n    user: \"Leon Fischer\",\n    initials: \"LF\",\n    avatar: \"https://i.pravatar.cc/150?img=8\",\n    action: \"Deployed to production\",\n    target: \"v2.4.1\",\n    time: \"1 Hour Ago\",\n    done: true,\n  },\n  {\n    user: \"Suki Tanaka\",\n    initials: \"ST\",\n    avatar: \"https://i.pravatar.cc/150?img=29\",\n    action: \"Created project\",\n    target: \"Rebrand: Q3\",\n    time: \"3 Hours Ago\",\n    done: false,\n  },\n]\n\nexport default function SidebarBlock() {\n  const [query, setQuery] = React.useState(\"\")\n  const normalized = query.trim().toLowerCase()\n  const filteredActivity = normalized\n    ? recentActivity.filter((item) =>\n        [item.user, item.action, item.target].some((field) =>\n          field.toLowerCase().includes(normalized)\n        )\n      )\n    : recentActivity\n\n  return (\n    <SidebarProvider defaultOpen className=\"min-h-svh\">\n      <Sidebar collapsible=\"icon\">\n        <SidebarHeader>\n          <div className=\"flex h-10 items-center gap-2.5 px-2\">\n            <svg\n              viewBox=\"0 0 24 24\"\n              fill=\"currentColor\"\n              aria-hidden=\"true\"\n              className=\"size-5 shrink-0 text-primary\"\n            >\n              <rect\n                x=\"3\"\n                y=\"3\"\n                width=\"8\"\n                height=\"8\"\n                transform=\"rotate(-6 7 7)\"\n              />\n              <rect\n                x=\"3\"\n                y=\"13\"\n                width=\"8\"\n                height=\"8\"\n                transform=\"rotate(5 7 17)\"\n              />\n              <rect\n                x=\"13\"\n                y=\"13\"\n                width=\"8\"\n                height=\"8\"\n                transform=\"rotate(-4 17 17)\"\n              />\n              <rect\n                x=\"13\"\n                y=\"3\"\n                width=\"8\"\n                height=\"8\"\n                transform=\"rotate(15 17 7)\"\n              />\n            </svg>\n            <span className=\"text-sm font-bold tracking-tight group-data-[collapsible=icon]:hidden\">\n              Acme Corp\n            </span>\n          </div>\n        </SidebarHeader>\n\n        <SidebarContent>\n          <SidebarGroup>\n            <SidebarGroupLabel>Menu</SidebarGroupLabel>\n            <SidebarGroupContent>\n              <SidebarMenu>\n                {mainNav.map((item) => (\n                  <SidebarMenuItem key={item.label}>\n                    <SidebarMenuButton\n                      isActive={item.active}\n                      tooltip={item.label}\n                      render={<a href=\"#\" />}\n                    >\n                      <item.icon aria-hidden=\"true\" />\n                      <span>{item.label}</span>\n                    </SidebarMenuButton>\n                    {item.badge && (\n                      <SidebarMenuBadge>{item.badge}</SidebarMenuBadge>\n                    )}\n                  </SidebarMenuItem>\n                ))}\n              </SidebarMenu>\n            </SidebarGroupContent>\n          </SidebarGroup>\n\n          <SidebarGroup>\n            <SidebarGroupLabel>Workspace</SidebarGroupLabel>\n            <SidebarGroupContent>\n              <SidebarMenu>\n                {workspaceNav.map((item) => (\n                  <SidebarMenuItem key={item.label}>\n                    <SidebarMenuButton\n                      tooltip={item.label}\n                      render={<a href=\"#\" />}\n                    >\n                      <item.icon aria-hidden=\"true\" />\n                      <span>{item.label}</span>\n                    </SidebarMenuButton>\n                  </SidebarMenuItem>\n                ))}\n              </SidebarMenu>\n            </SidebarGroupContent>\n          </SidebarGroup>\n        </SidebarContent>\n\n        <SidebarFooter>\n          <div className=\"flex items-center gap-3 p-1\">\n            <Avatar className=\"size-8 shrink-0\">\n              <AvatarImage\n                src=\"https://i.pravatar.cc/150?img=47\"\n                alt=\"Ada Lovelace\"\n                className=\"grayscale\"\n              />\n              <AvatarFallback>AL</AvatarFallback>\n            </Avatar>\n            <div className=\"min-w-0 flex-1 group-data-[collapsible=icon]:hidden\">\n              <p className=\"truncate text-sm font-semibold\">Ada Lovelace</p>\n              <p className=\"truncate text-xs text-muted-foreground\">\n                ada@acme.com\n              </p>\n            </div>\n            <Button\n              variant=\"ghost\"\n              size=\"icon\"\n              className=\"shrink-0 text-muted-foreground transition-colors duration-150 group-data-[collapsible=icon]:hidden hover:text-foreground\"\n              aria-label=\"Sign out\"\n            >\n              <IconPlaceholder\n                lucide=\"LogOut\"\n                tabler=\"IconLogout\"\n                hugeicons=\"Logout01Icon\"\n                phosphor=\"SignOut\"\n                remixicon=\"RiLogoutBoxRLine\"\n                aria-hidden=\"true\"\n              />\n            </Button>\n          </div>\n        </SidebarFooter>\n      </Sidebar>\n\n      <SidebarInset>\n        <header className=\"flex h-14 items-center gap-4 border-b border-border px-5\">\n          <SidebarTrigger className=\"-ml-1\" />\n          <div>\n            <h1 className=\"font-heading text-sm font-bold tracking-tight\">\n              Dashboard\n            </h1>\n          </div>\n          <div className=\"ml-auto flex items-center gap-2\">\n            <Input\n              type=\"search\"\n              placeholder=\"Search activity…\"\n              value={query}\n              onChange={(event) => setQuery(event.target.value)}\n              className=\"hidden w-48 sm:inline-flex\"\n              aria-label=\"Search activity\"\n            />\n            <Button\n              variant=\"outline\"\n              size=\"icon\"\n              className=\"relative\"\n              aria-label=\"Notifications\"\n            >\n              <IconPlaceholder\n                lucide=\"Bell\"\n                tabler=\"IconNotification\"\n                hugeicons=\"NotificationIcon\"\n                phosphor=\"Notification\"\n                remixicon=\"RiNotification3Line\"\n                aria-hidden=\"true\"\n              />\n              <span\n                className=\"absolute top-1.5 right-1.5 size-1.5 bg-primary\"\n                aria-hidden=\"true\"\n              />\n            </Button>\n          </div>\n        </header>\n\n        <div className=\"flex-1 overflow-y-auto p-5 sm:p-7\">\n          <div className=\"flex items-start justify-between gap-4\">\n            <div>\n              <h2 className=\"font-heading text-xl font-bold tracking-tight\">\n                Good morning, Ada\n              </h2>\n              <p className=\"mt-1 text-sm text-muted-foreground\">\n                Here&apos;s what&apos;s happening across your projects today.\n              </p>\n            </div>\n            <Button variant=\"outline\" size=\"sm\" className=\"shrink-0\">\n              <IconPlaceholder\n                lucide=\"Clock\"\n                tabler=\"IconClock\"\n                hugeicons=\"TimeIcon\"\n                phosphor=\"Clock\"\n                remixicon=\"RiTimeLine\"\n                className=\"mr-1.5 size-3.5\"\n                aria-hidden=\"true\"\n              />\n              Jun 20, 2026\n            </Button>\n          </div>\n\n          <div className=\"mt-6 grid gap-3 sm:grid-cols-2 md:grid-cols-4\">\n            {stats.map((s) => (\n              <div\n                key={s.label}\n                className=\"flex flex-col gap-3 rounded-lg border border-border bg-card p-4 transition-shadow duration-150 hover:shadow-sm\"\n              >\n                <p className=\"text-xs font-medium text-muted-foreground\">\n                  {s.label}\n                </p>\n                <p className=\"text-2xl font-bold tracking-tight\">{s.value}</p>\n                <div className=\"flex items-center gap-1.5\">\n                  {s.up ? (\n                    <IconPlaceholder\n                      lucide=\"ArrowUp\"\n                      tabler=\"IconArrowUp\"\n                      hugeicons=\"ArrowUpIcon\"\n                      phosphor=\"ArrowUp\"\n                      remixicon=\"RiArrowUpLine\"\n                      className=\"size-3.5 text-foreground\"\n                      aria-hidden=\"true\"\n                    />\n                  ) : (\n                    <IconPlaceholder\n                      lucide=\"ArrowDown\"\n                      tabler=\"IconArrowDown\"\n                      hugeicons=\"ArrowDownIcon\"\n                      phosphor=\"ArrowDown\"\n                      remixicon=\"RiArrowDownLine\"\n                      className=\"size-3.5 text-muted-foreground\"\n                      aria-hidden=\"true\"\n                    />\n                  )}\n                  <span\n                    className={\n                      \"text-xs font-semibold \" +\n                      (s.up ? \"text-foreground\" : \"text-muted-foreground\")\n                    }\n                  >\n                    {s.delta}\n                  </span>\n                  <span className=\"text-xs text-muted-foreground\">\n                    {s.note}\n                  </span>\n                </div>\n              </div>\n            ))}\n          </div>\n\n          <div className=\"mt-8\">\n            <div className=\"flex items-center justify-between gap-4 pb-3\">\n              <h3 className=\"font-heading text-sm font-semibold tracking-tight\">\n                Recent Activity\n              </h3>\n              <Button\n                nativeButton={false}\n                variant=\"ghost\"\n                size=\"sm\"\n                className=\"text-xs text-muted-foreground\"\n                render={<a href=\"#\" />}\n              >\n                View All\n              </Button>\n            </div>\n\n            <div className=\"divide-y divide-border overflow-hidden rounded-lg border border-border bg-card\">\n              {filteredActivity.length === 0 && (\n                <p className=\"px-4 py-10 text-center text-xs text-muted-foreground\">\n                  No activity matches “{query}”.\n                </p>\n              )}\n              {filteredActivity.map((item) => (\n                <div\n                  key={`${item.user}-${item.time}`}\n                  className=\"flex items-center gap-4 px-4 py-3 transition-colors duration-150 hover:bg-muted/50\"\n                >\n                  <Avatar className=\"size-8 shrink-0\">\n                    <AvatarImage\n                      src={item.avatar}\n                      alt={item.user}\n                      className=\"grayscale\"\n                    />\n                    <AvatarFallback className=\"text-[10px]\">\n                      {item.initials}\n                    </AvatarFallback>\n                  </Avatar>\n                  <div className=\"min-w-0 flex-1\">\n                    <div className=\"flex items-baseline gap-1.5\">\n                      <span className=\"text-sm font-semibold\">{item.user}</span>\n                      <span className=\"text-sm text-muted-foreground\">\n                        {item.action}\n                      </span>\n                    </div>\n                    <p className=\"truncate text-xs text-muted-foreground\">\n                      {item.target}\n                    </p>\n                  </div>\n                  <div className=\"flex shrink-0 items-center gap-3\">\n                    {item.done ? (\n                      <IconPlaceholder\n                        lucide=\"CircleCheck\"\n                        tabler=\"IconCircleCheck\"\n                        hugeicons=\"CheckmarkCircle02Icon\"\n                        phosphor=\"CheckCircle\"\n                        remixicon=\"RiCheckboxCircleLine\"\n                        className=\"size-4 text-foreground\"\n                        aria-label=\"Completed\"\n                      />\n                    ) : (\n                      <IconPlaceholder\n                        lucide=\"Clock\"\n                        tabler=\"IconClock\"\n                        hugeicons=\"TimeIcon\"\n                        phosphor=\"Clock\"\n                        remixicon=\"RiTimeLine\"\n                        className=\"size-4 text-muted-foreground\"\n                        aria-label=\"In progress\"\n                      />\n                    )}\n                    <span className=\"text-xs text-muted-foreground\">\n                      {item.time}\n                    </span>\n                    <DropdownMenu>\n                      <DropdownMenuTrigger\n                        render={\n                          <Button\n                            variant=\"ghost\"\n                            size=\"icon\"\n                            className=\"size-7 text-muted-foreground\"\n                            aria-label={`Actions for ${item.user}`}\n                          >\n                            <IconPlaceholder\n                              lucide=\"Ellipsis\"\n                              tabler=\"IconDots\"\n                              hugeicons=\"MoreHorizontalIcon\"\n                              phosphor=\"DotsThree\"\n                              remixicon=\"RiMoreLine\"\n                              aria-hidden=\"true\"\n                            />\n                          </Button>\n                        }\n                      />\n                      <DropdownMenuContent align=\"end\" className=\"w-40\">\n                        <DropdownMenuItem>\n                          <IconPlaceholder\n                            lucide=\"Eye\"\n                            tabler=\"IconEye\"\n                            hugeicons=\"EyeIcon\"\n                            phosphor=\"Eye\"\n                            remixicon=\"RiEyeLine\"\n                            aria-hidden=\"true\"\n                          />\n                          View Details\n                        </DropdownMenuItem>\n                        <DropdownMenuItem>\n                          <IconPlaceholder\n                            lucide=\"User\"\n                            tabler=\"IconUser\"\n                            hugeicons=\"UserIcon\"\n                            phosphor=\"User\"\n                            remixicon=\"RiUser3Line\"\n                            aria-hidden=\"true\"\n                          />\n                          View Profile\n                        </DropdownMenuItem>\n                        <DropdownMenuSeparator />\n                        <DropdownMenuItem>Mark as Read</DropdownMenuItem>\n                      </DropdownMenuContent>\n                    </DropdownMenu>\n                  </div>\n                </div>\n              ))}\n            </div>\n          </div>\n        </div>\n      </SidebarInset>\n    </SidebarProvider>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/blocks/sidebar-1.tsx"
    }
  ],
  "meta": {
    "height": "810px",
    "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": [
    "sidebar"
  ],
  "type": "registry:block"
}