Bootstrap 5

Bootstrap Tutorials

Bootstrap 5 Checkbox

Bootstrap 5 Checkbox, Radio

 

 

Checkboxes are used if the user wants to select any number of options from a list of preset options.

 

Styling Checkboxes:-

 

To style checkboxes, use a wrapper element with class="form-check" to ensure proper margins for labels and checkboxes.

Then, add the .form-check-label class to label elements, and .form-check-input to style checkboxes properly inside the .form-check container.

If you want to create a switch, then use the .form-switch class along with the .form-check class.

Code Explanation

All Tutorials related to Bootstrap Tutorials

All Sections related to Bootstrap 5