Collapsible sidebar app shell with search command palette, breadcrumb page header, scrollable nav sections, and avatar-based user dropdown.
Installation
Usage
How It Works
- Uses shadcn
Sidebarwithcollapsible="icon"andvariant="inset"for a polished inset layout that collapses to icon-only on toggle. - A custom search command palette opens via
⌘ K(or click), filtering sidebar nav items with keyboard-friendly list navigation inside aDialog. AppShell1PageHeaderrenders a breadcrumb trail with aSidebarTrigger, vertical separator, and an avatar dropdown menu for profile actions.- Sidebar sections support optional collapsing via the
collapsibleSubsectionsprop, animated with a CSSgrid-template-rowstrick for smooth height transitions. - Scroll fading masks (
bg-linear-to-b/bg-linear-to-t) are layered above and below the nav content to hint at overflowable content. - The user footer uses
OdysseyAvataras a fallback when no avatar image is available, deterministically picking a color from the user's name.
API Reference
AppShell1
| Prop | Type | Default |
|---|---|---|
config? | AppShell1Config | appShell1Config |
collapsibleSubsections? | boolean | false |
user? | SidebarUserInfo | - |
profileHref? | string | "/profile" |
onLogout? | () => void | - |
AppShell1PageHeader
| Prop | Type | Default |
|---|---|---|
pageName? | string | - |
breadcrumbs? | Array<{ label: string; href?: string }> | - |
actions? | React.ReactNode | - |
user? | SidebarUserInfo | - |
profileHref? | string | "/profile" |
onLogout? | () => void | - |
AppShell1Config
| Prop | Type | Default |
|---|---|---|
company? | SidebarCompany | - |
sections? | SidebarSection[] | - |