React playground

Nova v3.37.0

Preview

React

Sidebar guide

Building application navigation with the Nova sidebar family.

← nv-sidebar

Introduction

nv-sidebar provides a vertical navigation sidebar for application layouts. It supports persistent and collapsible modes, nested navigation groups with sub-items, notification badges, and automatic active-state highlighting based on the current route.

Key features:

  • Persistent and collapsible sidebar modes
  • Nested navigation with sub-items
  • Notification badges with configurable intention and emphasis
  • Automatic active state management via active-path

Choosing a mode

ModeBehavior
persistentAlways expanded; suited to wide application shells.
collapsibleCollapses to an icon rail; toggled by the user.
html<nv-sidebar type="collapsible" open>
  <nv-sidebarlogo label="My App"></nv-sidebarlogo>

  <nv-sidebarcontent>
    <nv-sidebargroup label="Main">
      <nv-sidebarnavitem icon="home">
        <a href="/dashboard">Dashboard</a>
      </nv-sidebarnavitem>
    </nv-sidebargroup>
  </nv-sidebarcontent>
</nv-sidebar>

Nested navigation

Collapsible nav items host nv-sidebarnavsubitem children. A nav item with notification-count renders a badge; its look follows the sidebar's notification-intention and notification-emphasis.

Active state

Set active-path on the sidebar to the current route. Items whose link matches (or whose sub-item matches) highlight automatically — no per-item bookkeeping needed.

html<nv-sidebar type="persistent" active-path="/analytics/reports">
  ...
</nv-sidebar>