Toggle a single option using Bootstrap's native checkbox contract.
Use .form-check when a single checkbox option can be independently on or off, or when several options in a set may be selected together. Keep the native input and label as siblings, give the input .form-check-input, give the label .form-check-label, and connect them with matching id and for.
.form-check
input
label
.form-check-input
.form-check-label
id
for
Let the label carry the hit target and write it as the choice the user is making. Add a short description below the label only when the consequence is not obvious, and group related checkboxes with a fieldset and legend when they answer one larger question.
Use the native checked and disabled attributes for state, and set indeterminate state from JavaScript because HTML has no indeterminate attribute. Mark invalid state on the input when validation fails so Bootstrap's sibling-state styling can reach the label and feedback.
checked
disabled
indeterminate
Unchecked and checked states share the same label contract; the input's checked attribute sets the initial state.
1 2 3 4 5 6 7 8 9 10 11 12 13 14<div class="field-group d-inline-flex"> <div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-unchecked"> <label class="form-check-label" for="checkbox-unchecked">Accept terms and conditions</label> </div> </div> <div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-checked" checked> <label class="form-check-label" for="checkbox-checked">Accept terms and conditions</label> </div> </div> </div>
<div class="field-group d-inline-flex"> <div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-unchecked"> <label class="form-check-label" for="checkbox-unchecked">Accept terms and conditions</label> </div> </div> <div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-checked" checked> <label class="form-check-label" for="checkbox-checked">Accept terms and conditions</label> </div> </div> </div>
Set invalid=true to pair with a form's validation state. Unlike other form controls, invalid checkboxes keep the focus ring visible on mouse click so the error stays prominent.
invalid=true
1 2 3 4 5 6<div class="field" data-invalid="true"> <div class="form-check"> <input class="form-check-input is-invalid" type="checkbox" id="checkbox-invalid" aria-invalid="true"> <label class="form-check-label" for="checkbox-invalid">Accept terms and conditions</label> </div> </div>
<div class="field" data-invalid="true"> <div class="form-check"> <input class="form-check-input is-invalid" type="checkbox" id="checkbox-invalid" aria-invalid="true"> <label class="form-check-label" for="checkbox-invalid">Accept terms and conditions</label> </div> </div>
Pair the checkbox with a label for proper layout and labeling. The form-check wrapper aligns the input and text on a shared baseline.
form-check
1 2 3 4 5 6<div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-basic"> <label class="form-check-label" for="checkbox-basic">Accept terms and conditions</label> </div> </div>
<div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-basic"> <label class="form-check-label" for="checkbox-basic">Accept terms and conditions</label> </div> </div>
Add supporting copy below the label with description. The helper text is linked via aria-describedby for screen readers.
description
aria-describedby
1 2 3 4 5 6 7<div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-desc" checked aria-describedby="checkbox-desc-description"> <label class="form-check-label" for="checkbox-desc">Accept terms and conditions</label> <div class="form-text" id="checkbox-desc-description">By clicking this checkbox, you agree to the terms and conditions.</div> </div> </div>
<div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-desc" checked aria-describedby="checkbox-desc-description"> <label class="form-check-label" for="checkbox-desc">Accept terms and conditions</label> <div class="form-text" id="checkbox-desc-description">By clicking this checkbox, you agree to the terms and conditions.</div> </div> </div>
Disabled checkboxes lower opacity and drop pointer interaction in both states.
1 2 3 4 5 6 7 8 9 10 11 12 13 14<div class="field-group d-inline-flex"> <div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-disabled" disabled> <label class="form-check-label" for="checkbox-disabled">Enable notifications</label> </div> </div> <div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-disabled-checked" checked disabled> <label class="form-check-label" for="checkbox-disabled-checked">Enable notifications</label> </div> </div> </div>
<div class="field-group d-inline-flex"> <div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-disabled" disabled> <label class="form-check-label" for="checkbox-disabled">Enable notifications</label> </div> </div> <div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-disabled-checked" checked disabled> <label class="form-check-label" for="checkbox-disabled-checked">Enable notifications</label> </div> </div> </div>
Stack multiple checkboxes with a shared label and description to create a checkbox list.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30<fieldset class="field-fieldset"> <legend class="field-legend">Show these items on the desktop</legend> <div class="field-description form-text">Select the items you want to show on the desktop.</div> <div class="field-group"> <div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-group-hard-disks" checked> <label class="form-check-label" for="checkbox-group-hard-disks">Hard disks</label> </div> </div> <div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-group-external" checked> <label class="form-check-label" for="checkbox-group-external">External disks</label> </div> </div> <div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-group-cd-dvd"> <label class="form-check-label" for="checkbox-group-cd-dvd">CDs, DVDs, and iPods</label> </div> </div> <div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-group-servers"> <label class="form-check-label" for="checkbox-group-servers">Connected servers</label> </div> </div> </div> </fieldset>
<fieldset class="field-fieldset"> <legend class="field-legend">Show these items on the desktop</legend> <div class="field-description form-text">Select the items you want to show on the desktop.</div> <div class="field-group"> <div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-group-hard-disks" checked> <label class="form-check-label" for="checkbox-group-hard-disks">Hard disks</label> </div> </div> <div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-group-external" checked> <label class="form-check-label" for="checkbox-group-external">External disks</label> </div> </div> <div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-group-cd-dvd"> <label class="form-check-label" for="checkbox-group-cd-dvd">CDs, DVDs, and iPods</label> </div> </div> <div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-group-servers"> <label class="form-check-label" for="checkbox-group-servers">Connected servers</label> </div> </div> </div> </fieldset>
Embed checkboxes inside table rows for batch selection. Use label_wrapper with aria_label so the entire cell is the hit target.
label_wrapper
aria_label
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54<div class="table-responsive"> <table class="table table-sm align-middle mb-0"> <thead> <tr> <th class="ps-1" style="width: 2.5rem"></th> <th>Name</th> <th>Email</th> <th>Role</th> </tr> </thead> <tbody> <tr> <td class="ps-1"> <label class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-row-1" aria-label="Select Ayla Norberg"> </label> </td> <td>Ayla Norberg</td> <td>ayla.norberg@example.com</td> <td>Admin</td> </tr> <tr> <td class="ps-1"> <label class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-row-2" aria-label="Select Marcus Voss"> </label> </td> <td>Marcus Voss</td> <td>marcus.voss@example.com</td> <td>User</td> </tr> <tr> <td class="ps-1"> <label class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-row-3" checked aria-label="Select Priya Kapoor"> </label> </td> <td>Priya Kapoor</td> <td>priya.kapoor@example.com</td> <td>Editor</td> </tr> <tr> <td class="ps-1"> <label class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-row-4" aria-label="Select Jonas Eriksen"> </label> </td> <td>Jonas Eriksen</td> <td>jonas.eriksen@example.com</td> <td>User</td> </tr> </tbody> </table> </div>
<div class="table-responsive"> <table class="table table-sm align-middle mb-0"> <thead> <tr> <th class="ps-1" style="width: 2.5rem"></th> <th>Name</th> <th>Email</th> <th>Role</th> </tr> </thead> <tbody> <tr> <td class="ps-1"> <label class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-row-1" aria-label="Select Ayla Norberg"> </label> </td> <td>Ayla Norberg</td> <td>ayla.norberg@example.com</td> <td>Admin</td> </tr> <tr> <td class="ps-1"> <label class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-row-2" aria-label="Select Marcus Voss"> </label> </td> <td>Marcus Voss</td> <td>marcus.voss@example.com</td> <td>User</td> </tr> <tr> <td class="ps-1"> <label class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-row-3" checked aria-label="Select Priya Kapoor"> </label> </td> <td>Priya Kapoor</td> <td>priya.kapoor@example.com</td> <td>Editor</td> </tr> <tr> <td class="ps-1"> <label class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-row-4" aria-label="Select Jonas Eriksen"> </label> </td> <td>Jonas Eriksen</td> <td>jonas.eriksen@example.com</td> <td>User</td> </tr> </tbody> </table> </div>
Compare Arabic, Hebrew, and English checkbox labels in an RTL layout for terms and notification workflows.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17<div class="d-grid gap-2" dir="rtl"> <div class="field-group"> <div class="field"> <div class="form-check form-check-reverse"> <input class="form-check-input" type="checkbox" id="checkbox-rtl-ar-terms"> <label class="form-check-label" for="checkbox-rtl-ar-terms">قبول الشروط والأحكام</label> </div> </div> <div class="field"> <div class="form-check form-check-reverse"> <input class="form-check-input" type="checkbox" id="checkbox-rtl-ar-notify" checked aria-describedby="checkbox-rtl-ar-notify-description"> <label class="form-check-label" for="checkbox-rtl-ar-notify">تفعيل الإشعارات</label> <div class="form-text" id="checkbox-rtl-ar-notify-description">يمكنك تفعيل أو إلغاء تفعيل الإشعارات في أي وقت.</div> </div> </div> </div> </div>
<div class="d-grid gap-2" dir="rtl"> <div class="field-group"> <div class="field"> <div class="form-check form-check-reverse"> <input class="form-check-input" type="checkbox" id="checkbox-rtl-ar-terms"> <label class="form-check-label" for="checkbox-rtl-ar-terms">قبول الشروط والأحكام</label> </div> </div> <div class="field"> <div class="form-check form-check-reverse"> <input class="form-check-input" type="checkbox" id="checkbox-rtl-ar-notify" checked aria-describedby="checkbox-rtl-ar-notify-description"> <label class="form-check-label" for="checkbox-rtl-ar-notify">تفعيل الإشعارات</label> <div class="form-text" id="checkbox-rtl-ar-notify-description">يمكنك تفعيل أو إلغاء تفعيل الإشعارات في أي وقت.</div> </div> </div> </div> </div>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17<div class="d-grid gap-2" dir="rtl"> <div class="field-group"> <div class="field"> <div class="form-check form-check-reverse"> <input class="form-check-input" type="checkbox" id="checkbox-rtl-he-terms"> <label class="form-check-label" for="checkbox-rtl-he-terms">קבלת תנאי השירות</label> </div> </div> <div class="field"> <div class="form-check form-check-reverse"> <input class="form-check-input" type="checkbox" id="checkbox-rtl-he-notify" checked aria-describedby="checkbox-rtl-he-notify-description"> <label class="form-check-label" for="checkbox-rtl-he-notify">הפעלת התראות</label> <div class="form-text" id="checkbox-rtl-he-notify-description">ניתן להפעיל או לבטל התראות בכל עת.</div> </div> </div> </div> </div>
<div class="d-grid gap-2" dir="rtl"> <div class="field-group"> <div class="field"> <div class="form-check form-check-reverse"> <input class="form-check-input" type="checkbox" id="checkbox-rtl-he-terms"> <label class="form-check-label" for="checkbox-rtl-he-terms">קבלת תנאי השירות</label> </div> </div> <div class="field"> <div class="form-check form-check-reverse"> <input class="form-check-input" type="checkbox" id="checkbox-rtl-he-notify" checked aria-describedby="checkbox-rtl-he-notify-description"> <label class="form-check-label" for="checkbox-rtl-he-notify">הפעלת התראות</label> <div class="form-text" id="checkbox-rtl-he-notify-description">ניתן להפעיל או לבטל התראות בכל עת.</div> </div> </div> </div> </div>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17<div class="d-grid gap-2" dir="ltr"> <div class="field-group"> <div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-rtl-en-terms"> <label class="form-check-label" for="checkbox-rtl-en-terms">Accept terms and conditions</label> </div> </div> <div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-rtl-en-notify" checked aria-describedby="checkbox-rtl-en-notify-description"> <label class="form-check-label" for="checkbox-rtl-en-notify">Enable notifications</label> <div class="form-text" id="checkbox-rtl-en-notify-description">You can enable or disable notifications at any time.</div> </div> </div> </div> </div>
<div class="d-grid gap-2" dir="ltr"> <div class="field-group"> <div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-rtl-en-terms"> <label class="form-check-label" for="checkbox-rtl-en-terms">Accept terms and conditions</label> </div> </div> <div class="field"> <div class="form-check"> <input class="form-check-input" type="checkbox" id="checkbox-rtl-en-notify" checked aria-describedby="checkbox-rtl-en-notify-description"> <label class="form-check-label" for="checkbox-rtl-en-notify">Enable notifications</label> <div class="form-text" id="checkbox-rtl-en-notify-description">You can enable or disable notifications at any time.</div> </div> </div> </div> </div>
For Bootstrap's source behavior and the shared form-check family, see the Bootstrap Checks and radios documentation.
No matching pages.
Restore the default appearance.