{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "app-shell-01",
  "description": "A sidebar app shell with a workspace switcher, navigation sections with count badges, a user menu and a top bar with breadcrumbs, search and notifications.",
  "registryDependencies": [
    "separator",
    "sidebar",
    "https://www.dashboardblocks.com/r/radix/app-shell.json"
  ],
  "files": [
    {
      "path": "registry/components/dashboardblocks/app-shell/app-shell-01.tsx",
      "content": "'use client'\n\nimport {\n  AppBreadcrumbs,\n  AppHeader,\n  AppNav,\n  AppPanel,\n  type AppUser,\n  type Crumb,\n  type NavSection,\n  NotificationsButton,\n  PanelButton,\n  type PanelButtonProps,\n  SearchButton,\n  SidebarUserMenu,\n  type ThemeChoice,\n  type UserMenuLink,\n  type Workspace,\n  WorkspaceSwitcher,\n} from '@/registry/components/dashboardblocks/app-shell'\nimport { IconPlaceholder } from '@/registry/icons/icon-placeholder'\nimport { type ReactNode, useState } from 'react'\n\nimport { Separator } from '@/components/ui/separator'\nimport {\n  Sidebar,\n  SidebarContent,\n  SidebarFooter,\n  SidebarHeader,\n  SidebarInset,\n  SidebarProvider,\n  SidebarTrigger,\n} from '@/components/ui/sidebar'\n\nimport { cn } from '@/lib/utils'\n\ninterface AppShell1Props {\n  /** Shown across the top of every page, under the header, such as a notice that something needs fixing. */\n  banner?: ReactNode\n  breadcrumbs: Crumb[]\n  children?: ReactNode\n  /** Leave out to hide the notifications button. */\n  notificationCount?: number\n  /** Adds \"New workspace\" to the workspace switcher. */\n  onCreateWorkspace?: () => void\n  onNotificationsClick?: () => void\n  onSearch?: () => void\n  onSignOut?: () => void\n  /** Opens another workspace. Leave out to switch in the shell only. */\n  onWorkspaceChange?: (id: string) => void\n  /** A panel beside the page, such as a copilot, opened from a button in the header: docked on a wide screen, a sheet on a smaller one. */\n  panel?: AppShell1Panel\n  pathname: string\n  /** @default 'Search' */\n  searchPlaceholder?: string\n  /** Pinned to the bottom of the sidebar, above the user menu, such as Help and Settings. */\n  secondarySections?: NavSection[]\n  sections: NavSection[]\n  /** Adds a Light, Dark and System choice to the user menu, such as `useTheme()` from next-themes. */\n  theme?: ThemeChoice\n  user: AppUser\n  userLinks: UserMenuLink[]\n  /** The workspace that's open. Leave out to start on the first. */\n  workspaceId?: string\n  workspaces: Workspace[]\n}\n\ninterface AppShell1Panel extends Omit<PanelButtonProps, 'className'> {\n  /** The panel's content, which fills its height. Its own close button calls `onOpenChange(false)`. */\n  children: ReactNode\n}\n\nconst exampleProps: AppShell1Props = {\n  breadcrumbs: [{ href: '#', label: 'Store' }, { label: 'Orders' }],\n  notificationCount: 3,\n  pathname: '/orders',\n  sections: [\n    {\n      items: [\n        {\n          href: '/',\n          icon: (\n            <IconPlaceholder\n              lucide='LayoutDashboardIcon'\n              tabler='IconDashboard'\n              hugeicons='DashboardSquare01Icon'\n              phosphor='SquaresFourIcon'\n              remixicon='RiDashboardLine'\n            />\n          ),\n          title: 'Overview',\n        },\n        {\n          href: '/analytics',\n          icon: (\n            <IconPlaceholder\n              lucide='ChartLineIcon'\n              tabler='IconChartLine'\n              hugeicons='ChartIcon'\n              phosphor='ChartLineIcon'\n              remixicon='RiLineChartLine'\n            />\n          ),\n          title: 'Analytics',\n        },\n        {\n          href: '/reports',\n          icon: (\n            <IconPlaceholder\n              lucide='FileChartColumnIcon'\n              tabler='IconReport'\n              hugeicons='Analytics01Icon'\n              phosphor='FileTextIcon'\n              remixicon='RiFileChartLine'\n            />\n          ),\n          title: 'Reports',\n        },\n      ],\n    },\n    {\n      items: [\n        {\n          badge: 12,\n          href: '/orders',\n          icon: (\n            <IconPlaceholder\n              lucide='ShoppingCartIcon'\n              tabler='IconShoppingCart'\n              hugeicons='ShoppingCart01Icon'\n              phosphor='ShoppingCartIcon'\n              remixicon='RiShoppingCartLine'\n            />\n          ),\n          title: 'Orders',\n        },\n        {\n          href: '/products',\n          icon: (\n            <IconPlaceholder\n              lucide='PackageIcon'\n              tabler='IconPackage'\n              hugeicons='PackageIcon'\n              phosphor='PackageIcon'\n              remixicon='RiBox3Line'\n            />\n          ),\n          title: 'Products',\n        },\n        {\n          href: '/customers',\n          icon: (\n            <IconPlaceholder\n              lucide='UsersIcon'\n              tabler='IconUsers'\n              hugeicons='UserGroupIcon'\n              phosphor='UsersIcon'\n              remixicon='RiTeamLine'\n            />\n          ),\n          title: 'Customers',\n        },\n        {\n          badge: 'New',\n          href: '/discounts',\n          icon: (\n            <IconPlaceholder\n              lucide='TagIcon'\n              tabler='IconTag'\n              hugeicons='Tag01Icon'\n              phosphor='TagIcon'\n              remixicon='RiPriceTag3Line'\n            />\n          ),\n          title: 'Discounts',\n        },\n      ],\n      label: 'Store',\n    },\n  ],\n  user: {\n    avatar: '/images/avatar-05.webp',\n    email: 'amara@acme.com',\n    name: 'Amara Okafor',\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: '/billing',\n      icon: (\n        <IconPlaceholder\n          lucide='CreditCardIcon'\n          tabler='IconCreditCard'\n          hugeicons='CreditCardIcon'\n          phosphor='CreditCardIcon'\n          remixicon='RiBankCardLine'\n        />\n      ),\n      label: 'Billing',\n    },\n  ],\n  workspaces: [\n    {\n      id: 'acme',\n      logo: (\n        <IconPlaceholder\n          lucide='GalleryVerticalEndIcon'\n          tabler='IconLayoutRows'\n          hugeicons='LayoutBottomIcon'\n          phosphor='RowsIcon'\n          remixicon='RiGalleryLine'\n        />\n      ),\n      name: 'Acme Store',\n      plan: 'Pro plan',\n    },\n    {\n      id: 'outlet',\n      logo: (\n        <IconPlaceholder\n          lucide='AudioLinesIcon'\n          tabler='IconWaveSine'\n          hugeicons='AudioWave01Icon'\n          phosphor='WaveformIcon'\n          remixicon='RiPulseLine'\n        />\n      ),\n      name: 'Acme Outlet',\n      plan: 'Starter plan',\n    },\n  ],\n}\n\nconst AppShell1 = (props: AppShell1Props) => {\n  const {\n    banner,\n    breadcrumbs,\n    children,\n    notificationCount,\n    onCreateWorkspace,\n    onNotificationsClick = () => {},\n    onSearch = () => {},\n    onSignOut = () => {},\n    onWorkspaceChange,\n    panel,\n    pathname,\n    searchPlaceholder,\n    secondarySections,\n    sections,\n    theme,\n    user,\n    userLinks,\n    workspaceId,\n    workspaces,\n  } = props\n  const [chosen, setChosen] = useState(workspaces[0]?.id ?? '')\n\n  return (\n    <SidebarProvider>\n      <Sidebar>\n        <SidebarHeader>\n          <WorkspaceSwitcher\n            onCreate={onCreateWorkspace}\n            onValueChange={onWorkspaceChange ?? setChosen}\n            value={workspaceId ?? chosen}\n            workspaces={workspaces}\n          />\n        </SidebarHeader>\n        <SidebarContent>\n          <AppNav pathname={pathname} sections={sections} />\n          {secondarySections && (\n            <AppNav\n              className='mt-auto'\n              pathname={pathname}\n              sections={secondarySections}\n            />\n          )}\n        </SidebarContent>\n        <SidebarFooter>\n          <SidebarUserMenu\n            links={userLinks}\n            onSignOut={onSignOut}\n            theme={theme}\n            user={user}\n          />\n        </SidebarFooter>\n      </Sidebar>\n      <SidebarInset className='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            {panel && (\n              <PanelButton\n                icon={panel.icon}\n                label={panel.label}\n                onOpenChange={panel.onOpenChange}\n                open={panel.open}\n                shortcut={panel.shortcut}\n              />\n            )}\n            <SearchButton onOpen={onSearch} placeholder={searchPlaceholder} />\n            {notificationCount !== undefined && (\n              <NotificationsButton\n                count={notificationCount}\n                onClick={onNotificationsClick}\n              />\n            )}\n          </div>\n        </AppHeader>\n        {banner}\n        <div className='flex flex-1 flex-col gap-4 p-4 md:p-6'>\n          {children ?? <PagePlaceholder />}\n        </div>\n      </SidebarInset>\n      {panel && (\n        <AppPanel label={panel.label} onOpenChange={panel.onOpenChange} open={panel.open}>\n          {panel.children}\n        </AppPanel>\n      )}\n    </SidebarProvider>\n  )\n}\n\nconst PLACEHOLDER_STATS = ['w-20', 'w-24', 'w-16']\nconst PLACEHOLDER_ROWS = ['w-2/5', 'w-1/3', 'w-1/2', 'w-1/4', 'w-2/5', 'w-1/3']\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 gap-6 sm:grid-cols-3'>\n        {PLACEHOLDER_STATS.map((width) => (\n          <div key={width} 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-32 rounded-md' />\n          </div>\n        ))}\n      </div>\n      <div className='flex flex-col border-t'>\n        {PLACEHOLDER_ROWS.map((width, index) => (\n          <div key={index} className='flex items-center gap-4 border-b py-3.5'>\n            <div className={cn('bg-muted/60 h-3.5 rounded-sm', width)} />\n            <div className='bg-muted/60 ms-auto h-3.5 w-16 rounded-sm' />\n          </div>\n        ))}\n      </div>\n    </div>\n  )\n}\n\nexport {\n  AppShell1,\n  exampleProps as appShell1ExampleProps,\n  type AppShell1Panel,\n  type AppShell1Props,\n}\n",
      "type": "registry:component",
      "target": "@components/dashboardblocks/app-shell/app-shell-01.tsx"
    }
  ],
  "meta": {
    "shows": "A sidebar app shell with a workspace switcher, navigation sections with count badges, a user menu and a top bar with breadcrumbs, search and notifications.",
    "size": "page",
    "usedWith": [
      "app-shell-02"
    ],
    "component": "AppShell1",
    "props": "{ banner?: ReactNode; breadcrumbs: { href?: string; label: string }[]; children?: ReactNode; notificationCount?: number; onCreateWorkspace?: () => void; onNotificationsClick?: () => void; onSearch?: () => void; onSignOut?: () => void; onWorkspaceChange?: (id: string) => void; panel?: { children: ReactNode; label: string; icon?: ReactNode; onOpenChange: (open: boolean) => void; open: boolean; shortcut?: string }; pathname: string; searchPlaceholder?: 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 }[]; theme?: { onValueChange: (theme: \"light\" | \"dark\" | \"system\") => void; value: \"light\" | \"dark\" | \"system\" }; user: { avatar?: string; email: string; name: string }; userLinks: { href: string; icon: ReactNode; label: string }[]; workspaceId?: string; workspaces: { id: string; logo: ReactNode; name: string; plan?: string }[] }"
  },
  "type": "registry:component"
}
