In February 2021, I published this article: "Bootstrap v5 Navbar Component with Multi-Level and Mega Menu".
https://dev.to/typo3freelancer/bootstrap-v5-navbar-component-with-multi-level-and-mega-menu-1218
Due to the many requests, I just rebuilt the pen to make the example compatible for Bootstrap 5.0.2.
No more custom JavaScript required!
The JavaScript is completely dropped thanks to the new features in Bootstrap. You can create arbitrary dropdown menus with infinite levels using the "data-bs-auto-close" attributes and "data-bs-toggle", as well as the "dropend" and "dropstart" classes.
Top comments (3)
One thing everyone was probably waiting for a very long time. I am glad it's finally here.
Yes, the new Bootstrap Dropdown functionality is more than awesome. Just als modals and offcanvas ;)
Very neat.