|$ curl https://forge-ai.dev/api/markdown?path=docs/components/navigation
$cat docs/navigation.md
updated Recently·18 min read·published

Navigation

CSSHTMLTailwindBootstrapUIIntermediate🎯Free Tools
Introduction

Navigation components guide users through an application. This guide covers production-ready patterns in plain HTML/CSS, Tailwind CSS, and Bootstrap — including navbars, tabs, breadcrumbs, pagination, steppers, sidebars, and dropdowns.

info

Always use semantic elements such as <nav>, <ol> for breadcrumbs, and <button> for interactive toggles. Screen readers rely on correct landmark and list roles.
Tabs

Underline, pill, and bordered tab styles for switching content panels.

tabs
Live
untitled.html
HTML
1<div class="wrap">
2 <div class="tabs underline">
3 <button class="active">
4 Overview
5 </button>
6 <button>
7 Features
8 </button>
9 <button>
10 Pricing
11 </button>
12 <button>
13 FAQ
14 </button>
15 </div>
16 <div class="tabs pill">
17 <button class="active">
18 All
19 </button>
20 <button>
21 Images
22 </button>
23 <button>
24 Videos
25 </button>
26 <button>
27 Documents
28 </button>
29 </div>
30 <div class="tabs bordered">
31 <button class="active">
32 Preview
33 </button>
34 <button>
35 Code
36 </button>
37 <button>
38 Settings
39 </button>
40 </div>
41</div>
preview
Vertical Tabs

A left-hand tab rail paired with a content area, ideal for settings and dashboards.

vertical-tabs
Live
untitled.html
HTML
1<div class="v-tabs">
2 <div class="rail">
3 <button class="active">
4 <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
5 <circle cx="12" cy="12" r="3"/>
6 <path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/>
7 </svg>
8 General
9 </button>
10 <button>
11 <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
12 <path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/>
13 <polyline points="22,6 12,13 2,6"/>
14 </svg>
15 Notifications
16 </button>
17 <button>
18 <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
19 <rect x="1" y="4" width="22" height="16" rx="2"/>
20 <line x1="1" y1="10" x2="23" y2="10"/>
21 </svg>
22 Billing
23 </button>
24 <button>
25 <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
26 <path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/>
27 </svg>
28 Security
29 </button>
30 </div>
31 <div class="panel">
32 <h3>
33 General Settings
34 </h3>
35 <p>
36 Manage your profile, language, and default workspace preferences from this panel.
37 </p>
38 </div>
39</div>
preview
Pagination

Numbered pagination with ellipsis and a minimal previous/next variant.

pagination
Live
untitled.html
HTML
1<div class="wrap">
2 <nav class="pages" aria-label="Pagination">
3 <button class="p-btn" aria-label="Previous">
4 Prev
5 </button>
6 <button class="p-btn active" aria-current="page">
7 1
8 </button>
9 <button class="p-btn">
10 2
11 </button>
12 <button class="p-btn">
13 3
14 </button>
15 <span class="dots">
16 ...
17 </span>
18 <button class="p-btn">
19 12
20 </button>
21 <button class="p-btn" aria-label="Next">
22 Next
23 </button>
24 </nav>
25 <div class="simple">
26 <button class="s-btn">
27 ← Previous
28 </button>
29 <span class="info">
30 Page 3 of 12
31 </span>
32 <button class="s-btn">
33 Next →
34 </button>
35 </div>
36</div>
preview
Step Indicator

Progress stepper showing completed, current, and upcoming steps.

steps
Live
untitled.html
HTML
1<div class="stepper" aria-label="Checkout progress">
2 <div class="step done">
3 <div class="circle">
4 <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3">
5 <polyline points="20 6 9 17 4 12"/>
6 </svg>
7 </div>
8 <span>
9 Cart
10 </span>
11 </div>
12 <div class="line done">
13 </div>
14 <div class="step active">
15 <div class="circle">
16 2
17 </div>
18 <span>
19 Shipping
20 </span>
21 </div>
22 <div class="line">
23 </div>
24 <div class="step">
25 <div class="circle">
26 3
27 </div>
28 <span>
29 Payment
30 </span>
31 </div>
32 <div class="line">
33 </div>
34 <div class="step">
35 <div class="circle">
36 4
37 </div>
38 <span>
39 Confirm
40 </span>
41 </div>
42</div>
preview
Accessibility

Navigation must be usable with a keyboard, a screen reader, and at high zoom. Use clear focus indicators and semantic roles so users always know where they are.

  • Wrap primary navigation in a <nav> element and give it an aria-label when there are multiple nav regions.
  • Mark the current page or tab with aria-current="page" or aria-selected="true".
  • Breadcrumbs should use an ordered list (<ol>) so screen readers announce the hierarchy.
  • Ensure focus indicators are visible for every interactive link, button, and tab.
  • Dropdown toggles need aria-expanded and aria-haspopup if controlled by JavaScript.
  • Icon-only buttons and links require an aria-label that describes the destination or action.

Community

Get help on Slack, Discord or VIP

Stuck on a guide? Join the community and ask.