Checkbox

This component is a standalone checkbox. If used for a form field with mutiple checkboxes, see checkboxes component.

Elements

The component is composed of multiple elements:

  • checkbox the wrapper
    • checkbox__control tick box
    • checkbox__label clickable label
<div class="checkbox">
  <input type="checkbox" id="checkbox" value="checkbox" class="checkbox__control" checked />
  <label for="checkbox" class="checkbox__label">Checkbox</label>
</div>

Properties

Add classes to the wrapper class to change the style of the component.

Disabled

Add this class to signal users the field is disabled. Include pallote.js file to your project to automatically add the disabled attribute.

class="checkbox checkbox--disabled"