Checkbox
Checkboxes are most commonly used to give merchants a way to make a range of selections (zero, one, or multiple).
optional = ?
Name | Type | Description |
---|---|---|
label? | string |
Label for the checkbox. |
checked? | boolean |
Checkbox is selected. |
value? | boolean |
Alias for checked , to support iterating over multiple types of form fields. If both checked and value are used, checked is the source of truth. |
onChange? | (value: boolean) => void | Promise< |
Callback when checkbox is toggled. |
✅ Do | 🛑 Don't |
---|---|
Use Checkboxes to give merchants a multi select choice | Horizontally stack Checkboxes |
Vertically align Checkboxes |
For more guidelines, refer to Polaris' Checkbox best practices.