Live demo
Demo source
Use a navbar for the main destinations in a product. It groups links in a horizontal row and highlights the current page. This demo keeps navigation local so you can try each destination without leaving the preview.
Anatomy
A navbar with six callouts: 1 marks the current item, 2 its leading icon, 3 its label, 4 its notification count, 5 its trailing icon, and 6 another destination.
- Current item (
nv-navbar-item) identifies the open destination with its active background andcurrentstate. - Leading icon is optional; set
leadingIconto a Nova icon name. - Label names the destination. Keep it visible and concise.
- Notification displays a count from
notification. Values below 1 leave the badge out. - Trailing icon is optional; set it with
trailingIcon. - Default item is another link in the container's default slot.
Composing destinations
Place nv-navbar-item children directly in nv-navbar. Each item needs a
label and href. The application router sets current after navigation;
clicking an item does not choose the active route for you. Keep one item
current, or none when the page belongs outside this group.
| Design setting | Component API |
|---|---|
| Items | Default slot of nv-navbar, containing nv-navbar-item children |
| Active destination | current on the matching item |
| Unavailable destination | disabled on the item |
| Icons | leadingIcon and trailingIcon on the item |
| Notification count | notification, with a translated notificationLabel |
The design's menu setting has no implementation in this release. Use links for destinations and keep dropdown indicators out of the navbar.
States and themes
Enabled items have default, hover and keyboard-focus appearances. The
current page uses the active treatment; disabled dims an unavailable item
and removes its destination and tab stop. Labels, icons and counts follow
the item state in Spark and Ocean, in light and dark mode.
The design source records an active-label contrast issue in Spark light (4.41:1 against its 4.5:1 target). Include that state in accessibility reviews; the source page tracks the design guidance.
Layout and accessibility
The navbar fills the space its container provides and wraps whole items in their original order. It has no automatic mobile collapse or overflow menu. Keep labels short and choose the destinations that belong in the main navigation.
The component supplies a navigation landmark and a list of native links.
Name the landmark with aria-label or aria-labelledby. The current link
exposes aria-current="page". Tab and Shift+Tab visit enabled links; Enter
follows one. Native link actions, including opening a new tab, remain
available.
Icons are decorative. notificationLabel supplies a separate accessible
description, with {count} replaced by the count, so a badge does not
change the destination's name. Translate this text with the application.
Use Tabs for related views within a page and Sidebar for vertical application navigation.