Course Content
Bootstrap 5 Alerts
0/1
Progress Bars
0/1
Spinners
0/1
Pagination
0/1
List Groups
0/1
Bootstrap 5 Scrollspy
0/1
Bootstrap
About Lesson

Different Dropdown Variants

  • .btn-group → Groups buttons together
  • .dropdown-toggle-split → Creates a split button dropdown
  • .dropup → Changes the dropdown direction to upward
  • .dropend → Opens dropdown menu to the right
  • .dropstart → Opens dropdown menu to the left
HTML
<div class="btn-group">
  <button type="button" class="btn btn-success">Options</button>
  <button type="button" class="btn btn-success dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown">
  </button>
  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">Option 1</a></li>
    <li><a class="dropdown-item" href="#">Option 2</a></li>
  </ul>
</div>
HTML
<div class="btn-group dropup">
  <button type="button" class="btn btn-danger dropdown-toggle" data-bs-toggle="dropdown">
    Dropup
  </button>
  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">Action</a></li>
  </ul>
</div>