Skip to content

Vertical Tabs

Bootstrap 5 vertical nav-pills tabs styled as a settings panel with a dark sidebar, icons, fading content panes and a scrollable mobile tab strip.

Also known as: vertical tab menu, side tabs layout, settings panel tabs, tabbed settings page

Vertical Tabs live demo

Open in new tab

Bootstrap 5 code (HTML, CSS)

A Bootstrap 5 vertical tabs component built from nav-pills, styled as a project settings panel with a dark indigo sidebar and a lime active pill. Use it for account settings, dashboards, documentation sections or any place where several related panels share one card.

How it works

The root section.vt-tabs holds a rounded .vt-shell card split into two Bootstrap columns. The left .vt-side column contains the .vt-nav pill list: four button.nav-link elements with data-bs-toggle="pill" and a data-bs-target that points to a matching .tab-pane. The right column holds the .tab-content.vt-content container with the General, Team, Notifications and Billing panes.

There is no custom JavaScript. Bootstrap's Tab plugin, loaded with the bundle, switches the active class, updates aria-selected, moves tabindex and fades the panes in with the fade and show classes.

The layout is mobile first. Below 768px the nav uses flex-row and .vt-nav scrolls horizontally with overflow-x: auto, so the pills sit above the content as a scrollable strip. From the md breakpoint flex-md-column stacks them vertically and the sidebar fills the full card height. The panes show typical settings content: a definition list (.vt-list), a member list with initials avatars (.vt-members, .vt-avatar), switch toggles and a plan box (.vt-plan).

Customization

  • --vt-side-bg in .vt-tabs: changes the sidebar color, avatars, checked switches and the .vt-btn button in one place.
  • --vt-accent and --vt-accent-text in .vt-tabs: set the background and text color of the active pill and the small "Workspace" eyebrow.
  • --vt-radius in .vt-tabs: makes the outer card corners sharper or rounder.
  • col-md-4 col-lg-3 on .vt-side: widen or narrow the sidebar; adjust the content column (col-md-8 col-lg-9) to match.
  • Add a tab by copying a button.nav-link and a .tab-pane, then give both new ids and point data-bs-target and aria-controls at the pane.
  • Remove fade from each .tab-pane to switch panels instantly instead of fading.
  • .vt-count badge in the Team tab: remove it or use it to show counts on other tabs.

Use cases

  • Account settings pages: a dark sidebar of pills switches between General, Team, Notifications and Billing panes
  • Dashboards: several related panels share one card, with fading content on the right
  • Documentation sections: vertical tabs group topics without leaving the page
  • Mobile layouts: the tabs turn into a horizontally scrollable strip above the content on small screens

Accessibility

The nav has role="tablist" and aria-orientation="vertical", each button has role="tab", aria-controls and aria-selected, and each pane has role="tabpanel" with aria-labelledby pointing to its tab. Bootstrap handles roving tabindex and arrow keys (Up/Down and Left/Right) plus Home and End between tabs. Tabs and panes show a clear :focus-visible outline, icons are hidden with aria-hidden="true", and initials avatars are hidden because the name is already readable. Fades and color transitions are turned off under prefers-reduced-motion: reduce.

Usage notes

Requires the Bootstrap 5 bundle (added automatically) and Bootstrap Icons. When you place two instances on one page, give the tabs and panes unique ids, because data-bs-target and aria-controls refer to ids.

Vertical Tabs at a glance

Framework
Bootstrap 5
Code
HTML, CSS
JavaScript
Only Bootstrap 5's own script
Dependencies
Bootstrap 5, Bootstrap Icons
Layout
Responsive, works on mobile
Category
Tabs
License
Free for personal and commercial use

Questions about this template

Can I use the Vertical Tabs code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Bootstrap 5 and Bootstrap Icons from a CDN (the links are under Requirements). Paste the HTML where the component should appear and add the CSS to your stylesheet. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. Only Bootstrap 5's own JavaScript is used, and the download already includes it.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
  • <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
Vertical Tabs – free Bootstrap 5 tabs template
Vertical Tabs · free Bootstrap 5 tabs template

More Tabs

Scrollable Tabs for Mobile – free Bootstrap 5 tabs template

Scrollable Tabs for Mobile

Bootstrap 5 tabs that scroll horizontally on small screens, with fade edges, arrow buttons, scroll snapping and the active tab centered automatically.

Tabs with Photo Preview Panels – free Tailwind CSS tabs template

Tabs with Photo Preview Panels

Tailwind CSS feature tabs that swap a large photo preview with a caption for each selected tab, with full keyboard support.

Animated Pill Tabs – free Pure CSS tabs template

Animated Pill Tabs

Segmented pill tabs with a sliding, springy background, ARIA tabs keyboard support and fading panels, shown on an analytics card. Pure CSS and vanilla JS.

Underline Tabs – free Tailwind CSS tabs template

Underline Tabs

Accessible Tailwind CSS tabs with a sliding underline indicator, arrow-key and Home/End navigation, count badge and scrollable tab bar on mobile.