AsterUIDocsv1.0.2

Docs / Component reference

SidebarNav

Organize links in collapsible groups and mark the destination the reader is currently viewing.

Sidebar nav example

Install

sh
npx @fierst/ui@1.0.2 add sidebar-nav

Registry dependencies: theme, icon. Package dependencies: @lucide/icons.

Exports from ./ui/sidebar-nav: SidebarNavGroup, SidebarNav.

Download the registry source for sidebar-nav 1.0.2.

API contracts

ts
export interface SidebarNavGroup {
  id: string;
  label: string;
  defaultOpen?: boolean;
  items: readonly {
    label: string;
    href: string;
    icon?: LucideIconInput;
    badge?: View;
    active?: boolean;
  }[];
}

export function* SidebarNav(
  props: {
    groups: readonly SidebarNavGroup[];
    class?: string;
  },
  ctx: Ctx,
)