Skip to content

Sidebar

Displays a navigational sidebar with customizable styles, containing items and subitems.

When to Use

  • To provide a navigational menu in your application.
  • When you need a collapsible side navigation for better organization of your application's sections.

Usage

javascript
import { Sidebar, SidebarItem, SidebarSubitem } from '@youcan/alto';
vue
<Sidebar>
    <template #header />
    <template #items>
      <SidebarItem label="Item label">
          <SidebarSubitem label="SubItem label"/>
      </SidebarItem>
    </template>
    <template #lower-items>
      <SidebarItem label="Settings"/>
    </template>
</Sidebar>

API Reference