bootstrap 5 tabs examples

Example 1: bootstrap nav tabs

<!-- Bootstrap 5 Nav tabs -->
<ul class="nav nav-pills nav-fill">
   <li class="nav-item">
      <a class="nav-link active" aria-current="page" href="#">Active</a>
   </li>
   <li class="nav-item">
      <a class="nav-link" href="#">Much longer nav link</a>
   </li>
   <li class="nav-item">
      <a class="nav-link" href="#">Link</a>
   </li>
   <li class="nav-item">
      <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true"
         >Disabled</a
      >
   </li>
</ul>

Example 2: bootstrap tabs

<nav>
  <div class="nav nav-tabs" id="nav-tab" role="tablist">
    <button class="nav-link active" id="nav-home-tab" data-bs-toggle="tab" data-bs-target="#nav-home" type="button" role="tab" aria-controls="nav-home" aria-selected="true">Home</button>
    <button class="nav-link" id="nav-profile-tab" data-bs-toggle="tab" data-bs-target="#nav-profile" type="button" role="tab" aria-controls="nav-profile" aria-selected="false">Profile</button>
    <button class="nav-link" id="nav-contact-tab" data-bs-toggle="tab" data-bs-target="#nav-contact" type="button" role="tab" aria-controls="nav-contact" aria-selected="false">Contact</button>
  </div>
</nav>
<div class="tab-content" id="nav-tabContent">
  <div class="tab-pane fade show active" id="nav-home" role="tabpanel" aria-labelledby="nav-home-tab">...</div>
  <div class="tab-pane fade" id="nav-profile" role="tabpanel" aria-labelledby="nav-profile-tab">...</div>
  <div class="tab-pane fade" id="nav-contact" role="tabpanel" aria-labelledby="nav-contact-tab">...</div>
</div>

Tags:

Misc Example