Checkbox
Checkboxes allow users to select multiple items from a list of individual items, or to mark one individual item as selected.
| Property | Values | Default value | Required |
|---|---|---|---|
| label | text When the label is not defined, the checkbox appears as a standalone checkbox. | - | |
| is selected | yes / no | no | |
| is indeterminate | yes / no When a checkbox is indeterminate, it overrides the selection state. | no | |
| size | s / m / l / xl | m | |
| is emphasized | yes / no | no | |
| is disabled | yes / no | no | |
| is error | yes / no | no | |
| state | default / hover / down / keyboard focus | default |
{
"slug": "checkbox",
"$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/component.json",
"$id": "https://opensource.adobe.com/spectrum-design-data/schemas/components/checkbox.json",
"title": "Checkbox",
"description": "Checkboxes allow users to select multiple items from a list of individual items, or to mark one individual item as selected.",
"meta": {
"category": "inputs",
"documentationUrl": "https://spectrum.adobe.com/page/checkbox/"
},
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "When the label is not defined, the checkbox appears as a standalone checkbox."
},
"isSelected": {
"type": "boolean",
"default": false
},
"isIndeterminate": {
"type": "boolean",
"default": false,
"description": "When a checkbox is indeterminate, it overrides the selection state."
},
"size": {
"type": "string",
"enum": [
"s",
"m",
"l",
"xl"
],
"default": "m"
},
"isEmphasized": {
"type": "boolean",
"default": false
},
"isDisabled": {
"type": "boolean",
"default": false
},
"isError": {
"type": "boolean",
"default": false
},
"state": {
"type": "string",
"enum": [
"default",
"hover",
"down",
"keyboard focus"
],
"default": "default"
}
}
}