Index Nav Component

Reference: Elevate Lookbook | DESIGN.md

Basic Vertical Navigation

Simple vertical list of navigation links for page sections

<nav class="elv-index-nav" aria-label="Page sections">
  <a href="#section-1" class="elv-index-nav__item elv-index-nav__item--active">
    Overview
  </a>
  <a href="#section-2" class="elv-index-nav__item">
    Features
  </a>
  <a href="#section-3" class="elv-index-nav__item">
    Pricing
  </a>
</nav>

Horizontal Navigation

Horizontal layout for narrow content or top-level navigation

<nav class="elv-index-nav elv-index-nav--horizontal" aria-label="Article sections">
  <a href="#intro" class="elv-index-nav__item elv-index-nav__item--active">
    Introduction
  </a>
  <a href="#methodology" class="elv-index-nav__item">
    Methodology
  </a>
</nav>

Sidebar Navigation

Fixed sidebar with active indicator border

<nav class="elv-index-nav elv-index-nav--sidebar" aria-label="Documentation">
  <a href="#getting-started" class="elv-index-nav__item elv-index-nav__item--active">
    Getting Started
  </a>
  <a href="#components" class="elv-index-nav__item">
    Components
  </a>
</nav>

With Icons

Icons provide visual recognition for sections

<a href="#account" class="elv-index-nav__item elv-index-nav__item--active">
  <svg class="elv-index-nav__icon" viewBox="0 0 16 16" fill="currentColor">
    <path d="..."/>
  </svg>
  Account Settings
</a>

Compact Size

Smaller padding for dense interfaces

<nav class="elv-index-nav elv-index-nav--compact">
  <a href="#quick-1" class="elv-index-nav__item elv-index-nav__item--active">
    Quick Start
  </a>
</nav>

Interactive Example

Click navigation items to scroll to content sections

Section 1: Overview

This is the first section of content. The navigation above will track your scroll position and update the active state automatically.

Section 2: Details

This is the second section of content with more information.

Section 3: Summary

This is the final section with concluding content.

Usage Guidelines

Accessibility Notes

Design System Specs

Item Padding Default: 8px 16px, Compact: 6px 12px
Icon-Label Gap 8px
Border Radius 8px (radius-sm)
Inactive Text #201f23 (text-default)
Active Text #5746b2 (purple), weight 600
Active Background #f2f0f9 (P10)
Hover Background #f2f2f3 (N10)
Sidebar Border Right: 1px solid #dfdfe2; Active: 2px solid purple
Font Default: 14px/400, Active: 600
Transition 150ms ease on color and background