Bootstrap 5 FormsLesson 36Free preview
BS5 Checks and Radios
This lesson is part of Bootstrap · All levels
Summary
Checkboxes and radios are packed with class .form-check to have consistent distance and arrangement. The .form-check-inline class composes several options in a row, while .form-switch makes a toggle style switch. Make sure all the radio stations in the same group use the same attribute name.
Key points
- .form-check wrap the checkbox or radio with .form-check-input on the input.
- On the label to make the layout neat. (.form-check-label)
- .form-check-inline compiled the horizontal options.
- .form-switch makes the toggle of the switching style.
- All radio stations in a group must have the same name.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.