React playground

Nova v3.37.0

Preview

React

Tab Item

nv-tabitem

One selectable view in a tab group, connected to an application-owned content panel.

Parts

Live demo

Use a tab item for one view inside Tabs. The parent owns selection and keyboard navigation; the item supplies its label, identity, panel relationship and optional supporting content.

Anatomy

The Tabs anatomy shows the item, leading icon, label, notification, trailing icon, active underline and shared separator. Follow the parent guidance for the whole tab strip and its panels.

Usage

  • Give each item a unique value, a visible label, and a panelId.
  • Set the group's value to select a view. The item has no selected property; the container supplies aria-selected and its tab stop.
  • Render a panel with an ID matching panelId, role="tabpanel" and aria-labelledby pointing to the tab's ID. Set an explicit tab id when composing that relationship.
  • Keep the panel visible only while its view is selected. Use the parent's valueChanged event and the same state for programmatic changes.
  • Set disabled for an unavailable view. It remains visible, cannot be selected and is skipped during keyboard navigation.

leadingIcon and trailingIcon are decorative cues. A notification count appears from 1; translate notificationLabel with {count} to describe it without changing the view's name. Keep labels concise and use the parent's showSeparator for the optional full-width baseline.

Sources