Wondering why there's no native megamenu in bs 6? #43029
|
Megamenus are used all over the place and I'm wondering why bootstrap 6 doesn't include one as a new feature - I've been hoping since bootstrap 3 that one would eventually be added. Just a way to extend a dropdown to use a container or containuer-fluid like class, add any layout you want inside, and that's it. Sure, it's easy enough to use AI to code a mega menu, I did it for bs5 and the js is small and it works, but it would be nice to have something native at some point. |
Replies: 1 comment 2 replies
|
Only the maintainers can say why it isn't a separate component, but the good news is that you don't need extra JavaScript for the use case you describe. A normal dropdown can already be a full-width megamenu with existing classes: <nav class="navbar navbar-expand-lg">
<div class="container">
<ul class="navbar-nav">
<li class="nav-item dropdown position-static">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">Products</a>
<div class="dropdown-menu w-100 mt-0">
<div class="container">
<div class="row">
<div class="col-md-4">...</div>
<div class="col-md-4">...</div>
<div class="col-md-4">...</div>
</div>
</div>
</div>
</li>
</ul>
</div>
</nav>The trick is If you'd still like a dedicated megamenu, it's worth starting the discussion in the "Ideas" category or on the v6 tracking issue, so the maintainers can weigh it against keeping the component set small. |
Only the maintainers can say why it isn't a separate component, but the good news is that you don't need extra JavaScript for the use case you describe. A normal dropdown can already be a full-width megamenu with existing classes: