DEV Community

loading...
Cover image for UPDATED: Bootstrap v5.0.2 Navbar with Multi-Level and Mega Menu

UPDATED: Bootstrap v5.0.2 Navbar with Multi-Level and Mega Menu

Simon Köhler
Freelance PHP Backend-Developer and Expert for TYPO3 Open Source CMS
・1 min read

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.

Discussion (3)

Collapse
stoevno1 profile image
stoevno1

One thing everyone was probably waiting for a very long time. I am glad it's finally here.

Collapse
typo3freelancer profile image
Simon Köhler Author

Yes, the new Bootstrap Dropdown functionality is more than awesome. Just als modals and offcanvas ;)

Collapse
benjaminv profile image
benjaminv

Very neat.