# Sidebar An app sidebar that collapses to icons or off the canvas and becomes a sheet on phones. ```ehtml Example import { SidebarProvider, Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarGroupContent, SidebarMenu, SidebarMenuItem, SidebarMenuButton, SidebarRail, SidebarInset, SidebarTrigger, } from "@elements/ui/sidebar"; import { Icon } from "@elements/ui/icon"; Application {item.title}
...
``` ## Parts | Part | What it is | |---|---| | `SidebarProvider` | The app frame: a flex row that holds the state, the shortcut, the cookie and the phone breakpoint. Every part inside finds it. | | `Sidebar` | The panel. On desktop it collapses off the canvas or to icons; under 48rem it renders its content in a Sheet. | | `SidebarTrigger` | An icon button that toggles the sidebar (the sheet on phones). Place it anywhere inside the provider. | | `SidebarRail` | A thin strip on the sidebar's edge that toggles it on click. Not a tab stop. | | `SidebarInset` | The `
` beside the sidebar. With variant inset it becomes a raised card. | | `SidebarHeader / SidebarFooter` | Sticky top and bottom sections. | | `SidebarContent` | The scrolling middle. | | `SidebarGroup` | A section with a label, an optional action and content. | | `SidebarGroupLabel` | The group's heading; button makes it a button (for a CollapsibleTrigger). Hidden when collapsed to icons. | | `SidebarGroupAction` | An icon button in the group's corner. | | `SidebarGroupContent` | The group's body. | | `SidebarMenu / SidebarMenuItem` | A `