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.

Parts

PartFileDoes
SidebarSidebar.vueHolds the side navigation panel, which can collapse to icons or hide off-screen.
SidebarContentSidebarContent.vueHolds the scrollable groups and menus between the sidebar header and footer.
SidebarFooterSidebarFooter.vueHolds the content pinned at the bottom of the sidebar.
SidebarGroupSidebarGroup.vueGroups a label with the related menu items in the sidebar.
SidebarGroupActionSidebarGroupAction.vueAdds a small action button next to a sidebar group's label.
SidebarGroupContentSidebarGroupContent.vueHolds the menu belonging to a sidebar group.
SidebarGroupLabelSidebarGroupLabel.vueLabels a group of sidebar items with a heading.
SidebarHeaderSidebarHeader.vueHolds the content pinned at the top of the sidebar, such as a search field.
SidebarInputSidebarInput.vueLets the user search or filter from within the sidebar.
SidebarInsetSidebarInset.vueHolds the main page content beside the sidebar.
SidebarMenuSidebarMenu.vueLists the navigation items of a sidebar group.
SidebarMenuActionSidebarMenuAction.vueAdds a secondary action button to a sidebar menu item.
SidebarMenuBadgeSidebarMenuBadge.vueShows a count or status beside a sidebar menu item.
SidebarMenuButtonSidebarMenuButton.vueLets the user open a sidebar menu item, with a tooltip when collapsed.
SidebarMenuItemSidebarMenuItem.vueGroups one navigation entry with its button, action and badge.
SidebarMenuSkeletonSidebarMenuSkeleton.vueShows a placeholder for a sidebar menu item while it loads.
SidebarMenuSubSidebarMenuSub.vueLists the nested items under a sidebar menu item.
SidebarMenuSubButtonSidebarMenuSubButton.vueLets the user open a nested sidebar menu item.
SidebarMenuSubItemSidebarMenuSubItem.vueGroups one nested entry of a sidebar submenu.
SidebarProviderSidebarProvider.vueGroups all parts of the sidebar and shares its open state with them.
SidebarRailSidebarRail.vueLets the user toggle the sidebar by clicking along its edge.
SidebarSeparatorSidebarSeparator.vueSeparates sections within the sidebar.
SidebarTriggerSidebarTrigger.vueLets the user expand and collapse the sidebar.

Anatomy

<SidebarProvider>
  <Sidebar>
    <SidebarHeader />
    <SidebarContent>
      <SidebarGroup>
        <SidebarGroupLabel />
        <SidebarGroupContent>
          <SidebarMenu>
            <SidebarMenuItem>
              <SidebarMenuButton />
              <SidebarMenuAction />
              <SidebarMenuSub>
                <SidebarMenuSubItem>
                  <SidebarMenuSubButton />
                </SidebarMenuSubItem>
              </SidebarMenuSub>
              <SidebarMenuSkeleton />
              <SidebarMenuBadge />
            </SidebarMenuItem>
          </SidebarMenu>
          <SidebarInput />
        </SidebarGroupContent>
        <SidebarGroupAction />
      </SidebarGroup>
      <SidebarSeparator />
    </SidebarContent>
    <SidebarFooter />
    <SidebarRail />
  </Sidebar>
  <SidebarInset>
    <SidebarTrigger />
  </SidebarInset>
</SidebarProvider>

Styling

All of Sidebar’s styles live in sidebar.json. New to styling in Frontic UI? How styling works →

Install

npm packages
@lucide/vue
@vueuse/core
class-variance-authority
reka-ui

Built from

API reference

SidebarContent.vue

SidebarFooter.vue

SidebarGroup.vue

SidebarGroupAction.vue

SidebarGroupContent.vue

SidebarGroupLabel.vue

SidebarHeader.vue

SidebarInput.vue

SidebarInset.vue

SidebarMenu.vue

SidebarMenuAction.vue

SidebarMenuBadge.vue

SidebarMenuButton.vue

SidebarMenuItem.vue

SidebarMenuSkeleton.vue

SidebarMenuSub.vue

SidebarMenuSubButton.vue

SidebarMenuSubItem.vue

SidebarProvider.vue

SidebarRail.vue

SidebarSeparator.vue

SidebarTrigger.vue
Sidebar
State