Skip to content

@agala-labs/ui

Sidebar

Navigates hierarchical product areas across desktop and mobile.

Examples

Default
<AgalaSidebar v-model:active-value="active" v-model:expanded="expanded" :items="items" responsive />

Import

import { AgalaSidebar, AgalaSidebarGroup, AgalaSidebarItem, AgalaSidebarToggle } from '@agala-labs/ui'

API

PropTypeDefaultDescription
itemsSidebarNode[]Data-driven navigation tree.
activeValuestringSelected item.
expanded / defaultExpandedstring[]Controlled or initial open branches.
collapsedbooleanDesktop collapsed state.
openbooleanMobile drawer state.
responsivebooleanfalseEnables responsive behavior.
indent'compact' | 'comfortable'Nested density.
width / collapsedWidthstringCSS widths.

Events

  • update:activeValue
  • update:expanded
  • update:collapsed
  • update:open
  • select(value)

Slots

  • default
  • SidebarItem: icon and default

Accessibility

Tree branches expose expansion state, coordinate their disclosure and chevron motion, respect reduced motion, and keep the selected surface on the active leaf. Use SidebarToggle with aria-controls for mobile or collapsed navigation.

Released under the MIT License.