Bootstrap 6 nav tabs with an icon in front of every label, inside a clean project card. The active tab gets a blue top bar and a filled version of its icon, and two tabs carry count badges. The panels (Overview, Activity, Files, Team and Settings) fade in when you switch. It works without any custom JavaScript.
How it works
The tab list is a regular ul.nav.nav-tabs with role="tablist". Each button.nav-link has data-bs-toggle="tab", a data-bs-target pointing at its panel, role="tab", aria-controls and aria-selected. The panels are .tab-pane elements inside .tab-content, and the first one starts as tab-pane show active. Bootstrap 6's Tab plugin switches them through the data API and moves tabindex and aria-selected for you. Panels fade by default in Bootstrap 6, so the BS5 .fade class is not needed.
Every tab holds two Bootstrap Icons: an outline .twi-ico and a filled .twi-ico-on. CSS shows the filled one only inside .nav-link.active, so the icon changes with no script. Counts sit in .twi-count pills that turn blue on the active tab. A ::before bar on the active link draws the top accent line. The tab bar uses flex-wrap: nowrap and overflow-x: auto, so on phones it scrolls sideways instead of wrapping.
The panels show common card content: stat tiles with a Bootstrap .progress, an activity feed, a flush .list-group of files, .avatar initials for the team and Bootstrap 6 .switch toggles inside .form-field for settings.
Customization
--twi-brandand--twi-brand-softon.twi-root: change the active tab color, the top accent bar, badges and progress bar.--twi-page,--twi-cardand--twi-lineon.twi-root: adjust the page tint, card surface and borders.--bs-nav-link-padding-xand--bs-nav-link-padding-yon.twi-tabs: make tabs roomier or more compact.- Swap the icon pairs in each tab (for example
bi-bellandbi-bell-fill) to match your sections. - Add
tab-pane-instantto a.tab-paneto switch it without the fade. min-heighton.twi-content: keeps the card from jumping in height between short and long panels.
Use cases
- Project and task pages: tabs with outline icons switch between overview, tasks and files
- Dashboards: count badges on tabs show how many items each section holds
- Profile and detail pages: filled icons mark the active tab and panels fade in
- Keyboard-friendly interfaces: arrow keys move focus between the tabs without using the mouse
Accessibility
The markup follows the ARIA tabs pattern: tablist, tab and tabpanel roles, aria-controls, aria-labelledby and aria-selected. The Tab plugin adds roving tabindex, so Tab moves into the tab list once, Left and Right arrows (and Home and End) switch tabs, and Tab again moves into the focusable panel. Icons are aria-hidden. The count pills are hidden from screen readers and replaced by visually hidden text such as ", 3 new". Tabs have a visible blue focus outline. The fade is a short opacity change that Bootstrap disables under prefers-reduced-motion.
Bootstrap 6 notes
The tab markup is the same as Bootstrap 5, but .fade is no longer needed because panels fade by default. Switches are now <div class="switch"> with role="switch" instead of .form-check.form-switch, and avatars, badge-subtle theme-success and progress follow the new theme roles. Built on Bootstrap 6.0.0-alpha.1, so alpha APIs can still change. Icons come from Bootstrap Icons.