title: Bootstrap 5 navbar close automatically on menu item click along with the close icon
body: <p>We have used the basic navbar in bootstrap 5 for our header but it doesn't close automatically when a menu is clicked. The challenge is that I have also written some classes for the toggle button to switch between the close and the toggle icon. How can I close the navbar automatically when a menu option is clicked using bootstrap itself? Is there any build-in class available in bootstrap 5?</p>