{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "sidebar-3",
  "title": "Icon Rail With Tooltips",
  "description": "Collapsible sidebar that shrinks to an icon rail with tooltips, holding grouped navigation, badge counts, and a user footer.",
  "dependencies": [
    "@base-ui/react"
  ],
  "registryDependencies": [
    "avatar",
    "sidebar"
  ],
  "files": [
    {
      "path": "registry/blocks/sidebar/3/sidebar-block.tsx",
      "content": "\"use client\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\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\"\nimport type * as React from \"react\"\n\ntype IconProps = { className?: string; size?: number | string }\n\ntype IconRenderer = (props: IconProps) => React.ReactNode\n\ntype NavItem = {\n  label: string\n  icon: IconRenderer\n  active?: boolean\n  badge?: string\n}\n\nconst navGroups: { heading: string; items: NavItem[] }[] = [\n  {\n    heading: \"Overview\",\n    items: [\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      },\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      },\n    ],\n  },\n  {\n    heading: \"Workspace\",\n    items: [\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        badge: \"6\",\n      },\n      {\n        label: \"Calendar\",\n        icon: (p: IconProps) => (\n          <IconPlaceholder\n            lucide=\"Calendar\"\n            tabler=\"IconCalendar\"\n            hugeicons=\"CalendarIcon\"\n            phosphor=\"Calendar\"\n            remixicon=\"RiCalendarLine\"\n            {...p}\n          />\n        ),\n      },\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        badge: \"3\",\n      },\n    ],\n  },\n  {\n    heading: \"System\",\n    items: [\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        label: \"Support\",\n        icon: (p: IconProps) => (\n          <IconPlaceholder\n            lucide=\"LifeBuoy\"\n            tabler=\"IconLifebuoy\"\n            hugeicons=\"LifebuoyIcon\"\n            phosphor=\"Lifebuoy\"\n            remixicon=\"RiLifebuoyLine\"\n            {...p}\n          />\n        ),\n      },\n    ],\n  },\n]\n\nexport default function SidebarBlock() {\n  return (\n    <SidebarProvider className=\"min-h-svh text-foreground\">\n      <Sidebar collapsible=\"icon\">\n        <SidebarHeader className=\"h-16 justify-center border-b border-sidebar-border\">\n          <div className=\"flex items-center gap-2.5 px-1 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0\">\n            <div\n              className=\"flex size-9 shrink-0 items-center justify-center rounded-md bg-primary/10 p-2\"\n              aria-hidden=\"true\"\n            >\n              <svg\n                viewBox=\"0 0 24 24\"\n                fill=\"currentColor\"\n                className=\"size-full 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            </div>\n            <div className=\"min-w-0 flex-1 group-data-[collapsible=icon]:hidden\">\n              <p className=\"truncate text-sm font-bold tracking-tight\">Acme</p>\n              <p className=\"truncate text-xs text-muted-foreground\">\n                Workspace\n              </p>\n            </div>\n          </div>\n        </SidebarHeader>\n\n        <SidebarContent className=\"gap-2 py-2\">\n          {navGroups.map((group) => (\n            <SidebarGroup key={group.heading}>\n              <SidebarGroupLabel className=\"text-[10px] font-semibold tracking-widest uppercase\">\n                {group.heading}\n              </SidebarGroupLabel>\n              <SidebarGroupContent>\n                <SidebarMenu>\n                  {group.items.map((item) => (\n                    <SidebarMenuItem key={item.label}>\n                      <SidebarMenuButton\n                        size=\"lg\"\n                        isActive={item.active}\n                        tooltip={\n                          item.badge\n                            ? `${item.label} (${item.badge})`\n                            : item.label\n                        }\n                        render={<a href=\"#\" />}\n                        aria-current={item.active ? \"page\" : undefined}\n                        className=\"group-data-[collapsible=icon]:justify-center\"\n                      >\n                        <item.icon aria-hidden=\"true\" />\n                        <span className=\"group-data-[collapsible=icon]:hidden\">\n                          {item.label}\n                        </span>\n                      </SidebarMenuButton>\n                      {item.badge && (\n                        <SidebarMenuBadge className=\"top-1/2 -translate-y-1/2 tabular-nums\">\n                          {item.badge}\n                        </SidebarMenuBadge>\n                      )}\n                    </SidebarMenuItem>\n                  ))}\n                </SidebarMenu>\n              </SidebarGroupContent>\n            </SidebarGroup>\n          ))}\n        </SidebarContent>\n\n        <SidebarFooter className=\"border-t border-sidebar-border\">\n          <div className=\"flex items-center gap-3 p-1 group-data-[collapsible=icon]:justify-center\">\n            <Avatar className=\"size-9 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          </div>\n        </SidebarFooter>\n      </Sidebar>\n\n      <SidebarInset className=\"bg-muted/30\">\n        <header className=\"flex h-16 items-center gap-3 border-b border-border px-4 sm:px-6\">\n          <SidebarTrigger className=\"-ml-1\" />\n          <div className=\"h-7 w-40 rounded-md bg-muted\" aria-hidden=\"true\" />\n          <div\n            className=\"ml-auto h-8 w-24 rounded-lg bg-muted/70\"\n            aria-hidden=\"true\"\n          />\n        </header>\n\n        <div className=\"flex min-w-0 flex-1 flex-col p-6 sm:p-8\">\n          <div className=\"grid gap-4 sm:grid-cols-2 md:grid-cols-3\">\n            {Array.from({ length: 6 }).map((_, i) => (\n              <div\n                key={i}\n                className=\"flex flex-col gap-3 rounded-lg border border-border bg-card/40 p-5\"\n                aria-hidden=\"true\"\n              >\n                <div className=\"h-4 w-1/2 rounded-md bg-muted\" />\n                <div className=\"h-8 w-2/3 rounded-md bg-muted/80\" />\n                <div className=\"h-3 w-full rounded-md bg-muted/50\" />\n                <div className=\"h-3 w-4/5 rounded-md bg-muted/50\" />\n              </div>\n            ))}\n          </div>\n          <div\n            className=\"mt-4 flex-1 rounded-lg border border-border bg-card/40\"\n            aria-hidden=\"true\"\n          />\n        </div>\n      </SidebarInset>\n    </SidebarProvider>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/blocks/sidebar-3.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"
}