sidebar
Sidebar
Side panel on the start or end of the page, with groups, menus, badges and actions, that collapses off-screen or to icons and opens as a sheet on phones.
States: Default, Hover, Focus, Disabled
Parts
| Part | File | Does |
|---|---|---|
| Sidebar | Sidebar.vue | Holds the side navigation panel, which can collapse to icons or hide off-screen. |
| SidebarContent | SidebarContent.vue | Holds the scrollable groups and menus between the sidebar header and footer. |
| SidebarFooter | SidebarFooter.vue | Holds the content pinned at the bottom of the sidebar. |
| SidebarGroup | SidebarGroup.vue | Groups a label with the related menu items in the sidebar. |
| SidebarGroupAction | SidebarGroupAction.vue | Adds a small action button next to a sidebar group's label. |
| SidebarGroupContent | SidebarGroupContent.vue | Holds the menu belonging to a sidebar group. |
| SidebarGroupLabel | SidebarGroupLabel.vue | Labels a group of sidebar items with a heading. |
| SidebarHeader | SidebarHeader.vue | Holds the content pinned at the top of the sidebar, such as a search field. |
| SidebarInput | SidebarInput.vue | Lets the user search or filter from within the sidebar. |
| SidebarInset | SidebarInset.vue | Holds the main page content beside the sidebar. |
| SidebarMenu | SidebarMenu.vue | Lists the navigation items of a sidebar group. |
| SidebarMenuAction | SidebarMenuAction.vue | Adds a secondary action button to a sidebar menu item. |
| SidebarMenuBadge | SidebarMenuBadge.vue | Shows a count or status beside a sidebar menu item. |
| SidebarMenuButton | SidebarMenuButton.vue | Lets the user open a sidebar menu item, with a tooltip when collapsed. |
| SidebarMenuItem | SidebarMenuItem.vue | Groups one navigation entry with its button, action and badge. |
| SidebarMenuSkeleton | SidebarMenuSkeleton.vue | Shows a placeholder for a sidebar menu item while it loads. |
| SidebarMenuSub | SidebarMenuSub.vue | Lists the nested items under a sidebar menu item. |
| SidebarMenuSubButton | SidebarMenuSubButton.vue | Lets the user open a nested sidebar menu item. |
| SidebarMenuSubItem | SidebarMenuSubItem.vue | Groups one nested entry of a sidebar submenu. |
| SidebarProvider | SidebarProvider.vue | Groups all parts of the sidebar and shares its open state with them. |
| SidebarRail | SidebarRail.vue | Lets the user toggle the sidebar by clicking along its edge. |
| SidebarSeparator | SidebarSeparator.vue | Separates sections within the sidebar. |
| SidebarTrigger | SidebarTrigger.vue | Lets the user expand and collapse the sidebar. |
Anatomy
<SidebarProvider>
<Sidebar>
<SidebarHeader />
<SidebarContent>
<SidebarGroup>
<SidebarGroupLabel />
<SidebarGroupContent>
<SidebarMenu>
<SidebarMenuItem>
<SidebarMenuButton />
<SidebarMenuBadge />
<SidebarMenuSub>
<SidebarMenuSubItem>
<SidebarMenuSubButton />
</SidebarMenuSubItem>
</SidebarMenuSub>
</SidebarMenuItem>
</SidebarMenu>
</SidebarGroupContent>
<SidebarGroupAction />
</SidebarGroup>
<SidebarSeparator />
</SidebarContent>
<SidebarFooter />
<SidebarRail />
</Sidebar>
<SidebarInset>
<SidebarTrigger />
</SidebarInset>
</SidebarProvider>Styling
| Part | Recipe |
|---|---|
| Sidebar | sidebar |
| Sidebar | sidebar-size |
| Sidebar | sidebar-container |
| SidebarContent | sidebar-content |
| SidebarFooter | sidebar-footer |
| SidebarGroup | sidebar-group |
| SidebarGroupAction | sidebar-action |
| SidebarGroupContent | sidebar-group-content |
| SidebarGroupLabel | sidebar-group-label |
| SidebarHeader | sidebar-header |
| SidebarInput | sidebar-input |
| SidebarInset | sidebar-inset |
| SidebarMenu | sidebar-menu |
| SidebarMenuAction | sidebar-action |
| SidebarMenuBadge | sidebar-menu-badge |
| SidebarMenuButton | sidebar-menu-button |
| SidebarMenuSkeleton | sidebar-menu-skeleton |
| SidebarMenuSub | sidebar-menu-sub |
| SidebarMenuSubButton | sidebar-menu-sub-button |
| SidebarProvider | sidebar-wrapper |
| SidebarRail | sidebar-rail |
| SidebarRail | sidebar-rail-line |
| SidebarSeparator | sidebar-separator |
Install
Writes 26 files into components/ui/sidebar/. For agents, npx @frontic/ui docs sidebar prints this reference as markdown; the MCP server serves the same.
- npm packages
- @lucide/vue
- @vueuse/core
- class-variance-authority
- reka-ui
Built from
API reference
Sidebar Sidebar.vue
Holds the side navigation panel, which can collapse to icons or hide off-screen. Renders a <div>.
| Prop | Type | Default | |
|---|---|---|---|
| side | SidebarSide | 'start' | |
| variant | SidebarVariant | — | |
| collapsible | SidebarCollapsible | 'offcanvas' | |
| label | string | 'Sidebar' | |
| description | string | 'Displays the mobile sidebar.' | |
SidebarContent SidebarContent.vue
SidebarGroup SidebarGroup.vue
SidebarGroupAction SidebarGroupAction.vue
SidebarGroupContent SidebarGroupContent.vue
SidebarGroupLabel SidebarGroupLabel.vue
SidebarHeader SidebarHeader.vue
SidebarInput SidebarInput.vue
SidebarInset SidebarInset.vue
SidebarMenu SidebarMenu.vue
SidebarMenuAction SidebarMenuAction.vue
SidebarMenuBadge SidebarMenuBadge.vue
SidebarMenuButton SidebarMenuButton.vue
SidebarMenuItem SidebarMenuItem.vue
SidebarMenuSkeleton SidebarMenuSkeleton.vue
SidebarMenuSub SidebarMenuSub.vue
SidebarMenuSubButton SidebarMenuSubButton.vue
SidebarMenuSubItem SidebarMenuSubItem.vue
SidebarProvider SidebarProvider.vue
SidebarRail SidebarRail.vue
SidebarSeparator SidebarSeparator.vue
SidebarTrigger SidebarTrigger.vue
Example