Responsive Navbar
Responsive navbar behavior uses navbar-expand classes and collapse markup to switch between an expanded desktop navigation and a compact mobile trigger.
Core concept
Explain navbar-expand-lg, navbar-toggler, data-bs-toggle=collapse, data-bs-target, aria-controls, aria-expanded, and the collapse target\'s ID relationship.
Using it in a real interface
Build a navbar that expands at large screens and collapses below that breakpoint. Explain what the browser sees before JavaScript runs and what Bootstrap\'s plugin changes when the toggle is activated.
Implementation notes
Verify the mobile menu with keyboard navigation and narrow widths. A visually working toggle can still fail if its target ID or accessible state attributes are incorrect.