Bootstrap 5's offcanvas slides in a sleek sidebar from screen edges perfect for mobile navs that save space without cramping your main content, triggered by a simple hamburger button.â
Offcanvas beats bulky mobile menus by hiding nav behind a smooth slide-in panel (left, right, top, or bottom), keeping your viewport clean until tapped. Just add data-bs-toggle="offcanvas" to a button and .offcanvas-start class to the menu. Bootstrap's JS handles the overlay, backdrop, and swipe gestures automatically. Customize width with w-50 or position per breakpoint; debug by checking JS bundle loads and no z-index clashes with other modals. Mobile users love the native feel, and desktop gets a pro sidebar vibe.


.png)
.png)