Ask any question about Bootstrap here... and get an instant response.
Post this Question & Answer:
How can I create a multi-level dropdown menu using Bootstrap?
Asked on Feb 25, 2026
Answer
To create a multi-level dropdown menu in Bootstrap 5, you can nest dropdowns within each other using the appropriate classes. Here's a basic example to get you started.
<!-- BEGIN COPY / PASTE -->
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-expanded="false">
Main Menu
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li class="dropdown-submenu">
<a class="dropdown-item dropdown-toggle" href="#">Submenu</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="#">Submenu action</a></li>
<li><a class="dropdown-item" href="#">Another submenu action</a></li>
</ul>
</li>
</ul>
</div>
<!-- END COPY / PASTE -->Additional Comment:
✅ Answered with Bootstrap 5 best practices.- This example uses Bootstrap's dropdown classes to create a multi-level menu.
- The `dropdown-submenu` class is custom and requires additional CSS for proper styling and functionality.
- Ensure you include Bootstrap's JavaScript bundle for dropdowns to function correctly.
- You may need to add custom CSS to handle the display of the submenu, as Bootstrap 5 does not natively support multi-level dropdowns.
Recommended Links:
