Vue playground

Nova v3.38.0

Preview

Vue

Tabs

Switch between related sections of content in one view.

Overview#

Tabs allow users to switch between related sections of content — all housed under a single view. They improve clarity and reduce clutter by organizing content into digestible chunks.

A row of tabs: Usage, Design, which is selected, Code with a caret, Examples with a count, and Documentation.

When to Use

  • When multiple content sections need to share the same space
  • When users must easily compare or switch between different views
  • On pages with forms, settings, or filtered content (e.g., “All / Active / Archived”)

States#

The tabs with numbered markers on four items: Usage, Design, Examples and Documentation.
  1. Default: Unselected, idle state of a tab
  2. Active: The currently selected tab
  3. Hover: The tab being hovered over
  4. Disabled: A tab that is not interactive or currently available

Anatomy (Figma)#

The tabs' anatomy, with marker 1 on a tab and marker 2 on the row as a whole.
  1. <Tabs | Item>: Partial component. Can be configured to any of its available states.
  2. [Tabs]: Template component. Can be detached if needed to customize behavior or layout.

Look and feel#

Spark Theme

The tabs in the Spark theme, in light and dark mode.

Ocean Theme

The tabs in the Ocean theme, in light and dark mode.

This template has been completely built with intentional tokens, giving the ability to display the right color scheme accordingly to the theme and mode where it is deployed.

Best Practice#

  • Keep link labels short and scannable
  • Reserve right-aligned space for profile/actions if needed
  • Keep alignment consistent (use design tokens)

In code#

For Developers

This is purely layout markup — no JS logic is included.

Active state

To display one item as active, add the class “active” to the anchor.

Disabled state

To display one item as disabled, add the class “disabled” to the anchor.

Example

html<nav class="nv-buttongroup bg-level-00">
  <ul class="flex">
    <li>
      <a href="/login" class="nv-link">
        <nv-icon name="lock" size="md"> </nv-icon>
        Login page
      </a>
    </li>
    <li>
      <a href="/form" class="nv-link active">
        <nv-icon name="chart-dots" size="md"> </nv-icon>
        Forms
      </a>
    </li>
    <li>
      <a href="/typo" class="nv-link">
        <nv-icon name="feather" size="md"> </nv-icon>
        Typos
      </a>
    </li>
    <li>
      <a href="#" class="nv-link disabled">
        <nv-icon name="user" size="md"> </nv-icon>
        Other
      </a>
    </li>
  </ul>
</nav>