Vue playground

Nova v3.37.0

Preview

Vue

Sidebar

nv-sidebar

A persistent vertical container on the left of the screen for an application's main navigation.

Live demo

Type

Use a sidebar for an application's main navigation and structure. Place it on the left and use your application layout to keep it in place while page content scrolls. A collapsible sidebar can shrink to an icon rail, which gives more room for focused work. Mobile behaviour isn't defined yet.

Anatomy

An expanded sidebar with a logo, search field, grouped navigation with an active item and an expanded item, and a footer with utilities and a profile. Callouts mark 1 the collapse trigger, 2 the navigation content and 3 the footer.

The parts of a sidebar.
  1. Trigger (optional) switches a type="collapsible" sidebar between expanded and collapsed. Any other button can also change open.
  2. Content holds the logo (nv-sidebarlogo), an optional header (nv-sidebarheader) and the scrollable navigation (nv-sidebarcontent) with groups, dividers and navigation items.
  3. Footer (nv-sidebarfooter) stays at the bottom for global utilities and the signed-in user.

Position and interaction

Place the sidebar on the left. type="persistent" keeps the expanded layout; type="collapsible" adds the built-in trigger near the header. An external button can also toggle open, and openChanged reports the change.

Sizing

The design uses 312 px expanded and 80 px collapsed. The code takes its default widths from theme tokens. width sets an explicit expanded width, and resizable adds a resize handle bounded by minWidth and maxWidth. Keep the collapsed width consistent with the icon rail.

Customising the sections

Use nv-sidebarlogo for identity and nv-sidebarheader for context or tools such as search and shortcuts. Put groups and navigation items in nv-sidebarcontent; this is the scrollable section. Keep global utilities, notifications and the user profile in nv-sidebarfooter, outside that scroll area. These section components accept application content in their default slots.

Usage guidelines

  • Put branding in the logo and header, and global utilities in the footer.
  • Set activePath to the current link's href so the active item stands out.
  • Only collapse to a rail when every item has a distinct icon and no sub-items need to stay visible.
  • Don't put horizontally scrolling content inside the sidebar.

Make the active destination clearly visible in either theme, and retain accessible names when labels disappear in the collapsed rail.

Mobile

The design does not define a mobile sidebar interaction yet. Choose a mobile navigation pattern at application level; the desktop collapse control is not an automatically supplied mobile drawer.

Sources