# Sidebar A collapsible side panel for navigation and secondary content. ## Installation Start from a Svelte 5 application, then install the component package, shared theme, and Bits UI peer: ```bash pnpm add coss-svelte @coss-svelte/theme bits-ui ``` Import `@coss-svelte/theme/style-coss.css` after Tailwind from the application's global stylesheet. ## Usage ```svelte ``` ## Anatomy - `Sidebar` - `SidebarContent` - `SidebarFooter` - `SidebarGroup` - `SidebarGroupAction` - `SidebarGroupContent` - `SidebarGroupLabel` - `SidebarHeader` - `SidebarInput` - `SidebarInset` - `SidebarMenu` - `SidebarMenuAction` - `SidebarMenuBadge` - `SidebarMenuButton` - `SidebarMenuItem` - `SidebarMenuSkeleton` - `SidebarMenuSub` - `SidebarMenuSubButton` - `SidebarMenuSubItem` - `SidebarProvider` - `SidebarRail` - `SidebarSeparator` - `SidebarTrigger` ## API Reference ### Sidebar A collapsible side panel for navigation and secondary content. | Prop | Type | Default | Description | | --- | --- | --- | --- | | `items` | `SidebarItem[]` | `[]` | Items rendered by the component's built-in fallback composition. | | `label` | `string` | `"Sidebar"` | Accessible label or fallback visible label for the control. | | `side` | `"right" \| "left"` | `"left"` | Side from which the surface appears. | | `variant` | `"sidebar" \| "floating" \| "inset"` | `"sidebar"` | Visual variant for the component. | | `collapsible` | `"none" \| "icon" \| "offcanvas"` | `"offcanvas"` | Controls how the sidebar collapses. | | `state` | `"expanded" \| "collapsed"` | `"expanded"` | Visual state used by the sidebar fallback layout. | **Composition and refs** - `children: Snippet<[]>` Inherits from [Svelte