Useful when you want to group a series of checkboxes together on a single line.
<ul class="input-list">
<li class="input-item-inline">
<input id="checkbox-id" name="checkbox-name" type="checkbox" class="input input-checkbox" checked />
<label for="checkbox-id" class="input-label">Checkbox Label</label>
</li>
</ul>
Useful when you want to group a series of checkboxes together in a list (stacked by default).
<ul class="input-list">
<li class="input-item">
<input id="checkbox-id" name="checkbox-name" type="checkbox" class="input input-checkbox" checked />
<label for="checkbox-id" class="input-label">Checkbox Label</label>
</li>
</ul>
Useful when the checkboxes are displayed on a dark background.
<ul class="input-list">
<li class="input-item">
<input id="checkbox-id" name="checkbox-name" type="checkbox" class="input input-checkbox input-checkbox-inverse" checked />
<label for="checkbox-id" class="input-label-inverse">Checkbox Inverse Label</label>
</li>
</ul>
Useful when you want to the user to proceed with caution about the choices they’re making.
<ul class="input-list">
<li class="input-item">
<input id="checkbox-id" name="checkbox-name" type="checkbox" class="input input-checkbox input-checkbox-caution" checked />
<label for="checkbox-id" class="input-label">Checkbox Label</label>
</li>
</ul>
<!-- Secondary button with a checkbox in the unchecked state. -->
<button class="btn btn-secondary">
<input type="checkbox" class="input input-checkbox mr-5" />
Button Text
</button>
<!-- CTA button with a checkbox in the checked state. -->
<button class="btn btn-cta">
<input type="checkbox" class="input input-checkbox input-checkbox-inverse mr-5" checked />
Button Text
</button>
Switches are useful when the user has a choice to toggle on and off. Note: For the best UX, please make sure that the switch saves immediately each time it changes state.
<input type="checkbox" class="input input-switch" />
Useful when you don’t need to draw attention to the bright-red, off state.
<input type="checkbox" class="input input-switch-secondary" />
Useful to communicate that your object is only partially connected, and it needs additional attention.
<input type="checkbox" class="input input-switch-secondary input-switch-warning" />
.{ screen }-input-switch-{ sm..xl }
Each size can be used or altered at any breakpoint.
<!-- Input-Switch: Small -->
<input type="checkbox" class="input input-switch input-switch-sm" />
<!-- Input-Switch: Medium (Default) -->
<input type="checkbox" class="input input-switch" />
<!-- Input-Switch: Large -->
<input type="checkbox" class="input input-switch input-switch-lg" />
<!-- Input-Switch: X-Large -->
<input type="checkbox" class="input input-switch input-switch-xl" />