{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "app-shell-02",
  "description": "An app shell whose sidebar collapses to icons with tooltips, with nested links and help and settings pinned to the bottom.",
  "registryDependencies": [
    "button",
    "separator",
    "sidebar",
    "https://www.dashboardblocks.com/r/radix/app-shell.json"
  ],
  "files": [
    {
      "path": "registry/components/dashboardblocks/app-shell/app-shell-02.tsx",
      "content": "'use client'\n\nimport {\n  AppBrand,\n  AppBreadcrumbs,\n  AppHeader,\n  AppNav,\n  type AppUser,\n  type Crumb,\n  type NavSection,\n  SearchButton,\n  SidebarUserMenu,\n  type UserMenuLink,\n} from '@/registry/components/dashboardblocks/app-shell'\nimport { IconPlaceholder } from '@/registry/icons/icon-placeholder'\nimport type { ReactNode } from 'react'\n\nimport { Button } from '@/components/ui/button'\nimport { Separator } from '@/components/ui/separator'\nimport {\n  Sidebar,\n  SidebarContent,\n  SidebarFooter,\n  SidebarHeader,\n  SidebarInset,\n  SidebarProvider,\n  SidebarRail,\n  SidebarTrigger,\n} from '@/components/ui/sidebar'\n\nimport { cn } from '@/lib/utils'\n\ninterface AppShell2Props {\n  breadcrumbs: Crumb[]\n  children?: ReactNode\n  defaultCollapsed?: boolean\n  onCreate?: () => void\n  onSearch?: () => void\n  onSignOut?: () => void\n  pathname: string\n  secondarySections: NavSection[]\n  sections: NavSection[]\n  user: AppUser\n  userLinks: UserMenuLink[]\n}\n\nconst exampleProps: AppShell2Props = {\n  breadcrumbs: [{ href: '#', label: 'Reports' }, { label: 'Usage' }],\n  pathname: '/reports/usage',\n  secondarySections: [\n    {\n      items: [\n        {\n          href: '/help',\n          icon: (\n            <IconPlaceholder\n              lucide='CircleHelpIcon'\n              tabler='IconHelp'\n              hugeicons='HelpCircleIcon'\n              phosphor='QuestionIcon'\n              remixicon='RiQuestionLine'\n            />\n          ),\n          title: 'Help',\n        },\n        {\n          href: '/settings',\n          icon: (\n            <IconPlaceholder\n              lucide='Settings2Icon'\n              tabler='IconSettings'\n              hugeicons='Settings05Icon'\n              phosphor='GearIcon'\n              remixicon='RiSettingsLine'\n            />\n          ),\n          title: 'Settings',\n        },\n      ],\n    },\n  ],\n  sections: [\n    {\n      items: [\n        {\n          href: '/',\n          icon: (\n            <IconPlaceholder\n              lucide='HomeIcon'\n              tabler='IconHome'\n              hugeicons='HomeIcon'\n              phosphor='HouseIcon'\n              remixicon='RiHomeLine'\n            />\n          ),\n          title: 'Home',\n        },\n        {\n          badge: 4,\n          href: '/inbox',\n          icon: (\n            <IconPlaceholder\n              lucide='InboxIcon'\n              tabler='IconInbox'\n              hugeicons='InboxIcon'\n              phosphor='TrayIcon'\n              remixicon='RiInboxLine'\n            />\n          ),\n          title: 'Inbox',\n        },\n        {\n          icon: (\n            <IconPlaceholder\n              lucide='FolderIcon'\n              tabler='IconFolder'\n              hugeicons='Folder01Icon'\n              phosphor='FolderIcon'\n              remixicon='RiFolderLine'\n            />\n          ),\n          items: [\n            { href: '/projects', title: 'All projects' },\n            { badge: 3, href: '/projects/active', title: 'Active' },\n            { href: '/projects/archived', title: 'Archived' },\n          ],\n          title: 'Projects',\n        },\n        {\n          icon: (\n            <IconPlaceholder\n              lucide='ChartBarIcon'\n              tabler='IconChartBar'\n              hugeicons='ChartHistogramIcon'\n              phosphor='ChartBarIcon'\n              remixicon='RiBarChartLine'\n            />\n          ),\n          items: [\n            { href: '/reports/revenue', title: 'Revenue' },\n            { href: '/reports/usage', title: 'Usage' },\n            { href: '/reports/exports', title: 'Exports' },\n          ],\n          title: 'Reports',\n        },\n        {\n          href: '/team',\n          icon: (\n            <IconPlaceholder\n              lucide='UsersIcon'\n              tabler='IconUsers'\n              hugeicons='UserGroupIcon'\n              phosphor='UsersIcon'\n              remixicon='RiTeamLine'\n            />\n          ),\n          title: 'Team',\n        },\n      ],\n    },\n  ],\n  user: {\n    avatar: '/images/avatar-03.webp',\n    email: 'lena@northwind.io',\n    name: 'Lena Fischer',\n  },\n  userLinks: [\n    {\n      href: '/account',\n      icon: (\n        <IconPlaceholder\n          lucide='CircleUserRoundIcon'\n          tabler='IconUserCircle'\n          hugeicons='UserCircle02Icon'\n          phosphor='UserCircleIcon'\n          remixicon='RiUserLine'\n        />\n      ),\n      label: 'Account',\n    },\n    {\n      href: '/account/notifications',\n      icon: (\n        <IconPlaceholder\n          lucide='BellIcon'\n          tabler='IconBell'\n          hugeicons='NotificationIcon'\n          phosphor='BellIcon'\n          remixicon='RiNotificationLine'\n        />\n      ),\n      label: 'Notifications',\n    },\n  ],\n}\n\nconst AppShell2 = (props: AppShell2Props) => {\n  const {\n    breadcrumbs,\n    children,\n    defaultCollapsed = false,\n    onCreate = () => {},\n    onSearch = () => {},\n    onSignOut = () => {},\n    pathname,\n    secondarySections,\n    sections,\n    user,\n    userLinks,\n  } = props\n\n  return (\n    <SidebarProvider defaultOpen={!defaultCollapsed}>\n      <Sidebar collapsible='icon'>\n        <SidebarHeader>\n          <AppBrand\n            description='Analytics'\n            href='/'\n            logo={\n              <IconPlaceholder\n                lucide='CommandIcon'\n                tabler='IconInnerShadowTop'\n                hugeicons='CommandIcon'\n                phosphor='CommandIcon'\n                remixicon='RiCommandLine'\n              />\n            }\n            name='Northwind'\n          />\n        </SidebarHeader>\n        <SidebarContent>\n          <AppNav pathname={pathname} sections={sections} />\n          <AppNav className='mt-auto' pathname={pathname} sections={secondarySections} />\n        </SidebarContent>\n        <SidebarFooter>\n          <SidebarUserMenu links={userLinks} onSignOut={onSignOut} user={user} />\n        </SidebarFooter>\n        <SidebarRail />\n      </Sidebar>\n      <SidebarInset className='@container/inset min-w-0'>\n        <AppHeader>\n          <SidebarTrigger className='-ml-1' />\n          <Separator\n            orientation='vertical'\n            className='mr-2 data-vertical:h-4 data-vertical:self-auto'\n          />\n          <AppBreadcrumbs items={breadcrumbs} />\n          <div className='ml-auto flex items-center gap-2'>\n            <SearchButton onOpen={onSearch} />\n            <Button onClick={onCreate}>\n              <IconPlaceholder\n                lucide='PlusIcon'\n                tabler='IconPlus'\n                hugeicons='PlusSignIcon'\n                phosphor='PlusIcon'\n                remixicon='RiAddLine'\n                data-icon='inline-start'\n              />\n              <span className='@max-xl/inset:sr-only'>New report</span>\n            </Button>\n          </div>\n        </AppHeader>\n        <div className='flex flex-1 flex-col gap-4 p-4 md:p-6'>\n          {children ?? <PagePlaceholder />}\n        </div>\n      </SidebarInset>\n    </SidebarProvider>\n  )\n}\n\nconst PLACEHOLDER_STATS = ['w-20', 'w-24', 'w-16', 'w-20']\nconst PLACEHOLDER_BARS = [\n  34, 41, 38, 47, 44, 52, 49, 58, 55, 61, 57, 66, 63, 70, 67, 74, 71, 79, 76, 83, 80, 88,\n  85, 92,\n]\n\nfunction PagePlaceholder() {\n  return (\n    <div className='flex flex-1 flex-col gap-8'>\n      <div className='flex flex-col gap-2'>\n        <div className='bg-muted h-7 w-40 rounded-md' />\n        <div className='bg-muted/60 h-4 w-80 max-w-full rounded-md' />\n      </div>\n      <div className='grid grid-cols-2 gap-6 @3xl/inset:grid-cols-4'>\n        {PLACEHOLDER_STATS.map((width, index) => (\n          <div key={index} className='flex flex-col gap-3 border-t pt-3'>\n            <div className={cn('bg-muted/60 h-3.5 rounded-sm', width)} />\n            <div className='bg-muted h-9 w-28 rounded-md' />\n          </div>\n        ))}\n      </div>\n      <div className='flex h-64 items-end gap-1 border-t pt-6 sm:gap-2'>\n        {PLACEHOLDER_BARS.map((height, index) => (\n          <div\n            key={index}\n            className='bg-muted flex-1 rounded-t-sm'\n            style={{ height: `${height}%` }}\n          />\n        ))}\n      </div>\n    </div>\n  )\n}\n\nexport { AppShell2, exampleProps as appShell2ExampleProps, type AppShell2Props }\n",
      "type": "registry:component",
      "target": "@components/dashboardblocks/app-shell/app-shell-02.tsx"
    }
  ],
  "meta": {
    "shows": "An app shell whose sidebar collapses to icons with tooltips, with nested links and help and settings pinned to the bottom.",
    "size": "page",
    "usedWith": [
      "app-shell-01"
    ],
    "component": "AppShell2",
    "props": "{ breadcrumbs: { href?: string; label: string }[]; children?: ReactNode; defaultCollapsed?: boolean; onCreate?: () => void; onSearch?: () => void; onSignOut?: () => void; pathname: string; secondarySections: { items: { badge?: ReactNode; href?: string; icon: ReactNode; items?: { badge?: ReactNode; href: string; icon?: ReactNode; title: string }[]; onSelect?: () => void; title: string }[]; label?: string }[]; sections: { items: { badge?: ReactNode; href?: string; icon: ReactNode; items?: { badge?: ReactNode; href: string; icon?: ReactNode; title: string }[]; onSelect?: () => void; title: string }[]; label?: string }[]; user: { avatar?: string; email: string; name: string }; userLinks: { href: string; icon: ReactNode; label: string }[] }"
  },
  "type": "registry:component"
}
