Overview
NavigationList provides a flexible vertical navigation system with collapsible items, badges, and actions.
- Use it for sidebar navigation, settings panels, or file trees.
- Supports
surfaceandsidebartone variants. - Includes
light,subtle, andfilledvisual variants. - Built-in collapsible groups with automatic chevron indicators.
Installation
Import
Basic Example
Collapsible Groups
Advanced Example
Size and Variants
API Reference
NavigationList
Root navigation container with variant and tone options.Size of the navigation list:
xs | sm | md | lg | xl.Visual variant:
light | subtle | filled.Color tone:
surface | sidebar.NavigationListItem
Individual navigation item with optional collapsible behavior.Whether this item can be expanded/collapsed.
Controlled open state.
Initial open state (uncontrolled).
Callback when open state changes.
Whether the item is disabled.
NavigationListLink
Interactive link or button within a navigation item.URL for the link (uses
<a> if provided).Whether this link represents the current page.
Primary label text.
Secondary description text.
Content before the label (icons, avatars).
Content after the label (chevron auto-added for collapsible items).
Whether to truncate text with ellipsis.
Disable chevron rotation on collapsible items.
NavigationListBadge
Badge indicator positioned absolutely within the item.NavigationListAction
Action button positioned absolutely within the item.NavigationListContent
Additional content wrapper for custom layouts.NavigationListGroup
Semantic group container for related items.NavigationListGroupLabel
Label for a navigation group.NavigationListGroupContent
Content wrapper for group items.NavigationListSub
Nested sub-navigation container.NavigationListSubItem
Individual item within sub-navigation.NavigationListSubLink
Link within sub-navigation.NavigationListSeparator
Visual separator between items or groups.NavigationListSkeleton
Loading skeleton for navigation items.Accessibility
- Use semantic
<nav>element for primary navigation. - Mark the current page with
activeoraria-current="page". - Collapsible items announce expanded/collapsed state.
- Ensure keyboard navigation works for all interactive elements.
SSR and RSC Notes
- NavigationList is client-interactive due to collapsible behavior (
"use client"). - Static navigation lists without collapsible items can be server-rendered.
- Use client boundaries for interactive navigation.
Styling and Tokens
surfacetone uses standard semantic tokens (bg-muted,text-foreground).sidebartone uses sidebar-specific tokens (bg-sidebar-accent,text-sidebar-foreground).filledvariant applies accent backgrounds to active items.lightvariant applies subtle backgrounds.subtlevariant applies minimal backgrounds.
Troubleshooting
- Collapsible item not expanding: ensure
collapsible={true}is set onNavigationListItem. - Chevron not rotating: check
disableRightSectionRotationis not set totrue. - Active state not showing: verify
activeprop onNavigationListLink. - Text overflow issues: set
noWrap={true}for truncation.