The navbar menu is used in header or footer and in many cases in the content also. It is responsive by default in bootstrap and take size according to screen size.
The navbar get collapsed in case of small devices like mobile phones and there is some icon on clicking of which the navbar menu can be closed or open.
In this example we have added a checkbox and hide it by using css. The button is replaced by label and we connect the label to checkbox by giving for attribute. And on the basis of checkbox condition the navbar toggles.