Navigation

Navigation is a side-rail compound for app shells — selection, expandable categories, and optional collapse into an icon rail.

Bind NavigationConfig::selected_value and NavigationConfig::open_categories with Leptos signals; compose items inside NavigationBody. Pair with NavigationLink when using Leptos Router for client-side active styling. Theme width uses --orbital-navigation-width and --orbital-navigation-width-collapsed.

  • Primary app shell wayfinding — routes, grouped tools, admin sections
  • Expandable category groups with nested sub-items
  • Collapsible rail that shrinks to icon-only width in dense layouts
  • Create selected_value and open_categories signals at the app shell root.
  • Build NavigationConfig with .with_selected_value(…) and .with_open_categories(…).
  • Compose NavigationBody with NavigationItem, NavigationCategory, and section headers.
  • Optional: NavigationHeader / NavigationFooter slots; NavigationMaterial for surface treatment.
Default

Side rail with icon-and-label items and a parent-owned selected value. Bind signals at the shell so route changes can sync selection.

Categories

Expandable category groups with nested sub-items bound to open_categories. Use NavigationCategory when a section has many related links that should stay grouped under one header.

Sections

Static section labels that divide items into labeled blocks without accordion behavior. Add NavigationSectionHeader rows to organize long nav lists into scannable groups.

App item

Branding row at the top of the rail linking back to the app root. NavigationAppItem pairs an icon with an href for product identity above everyday route links.

Density compact

Tighter row spacing via density=NavigationDensity::Compact. Choose compact density for secondary sidebars, nested panels, or layouts that need more links in less vertical space.

Collapsible rail

Collapsible side rail that shrinks to icon-only width with collapsible=true and a parent-owned collapsed signal. Keeps categories and badges usable while reclaiming horizontal space in dense layouts.