Checkbox
View Source
Checkboxes are most commonly used to give users a way to make a range of selections (zero, one, or multiple). They may also be used as a way to have a user indicate that they agree to specific terms and conditions.
state: unchecked
checkbox: {fill: 'surface',stroke: 'grey-6',focusStroke: 'interaction-dark',checkedFill: 'interaction',checkedStroke: 'interaction',disabled: {fill: 'grey-2',stroke: 'grey-4',checkedFill: 'grey-6',checkedStroke: 'grey-6',opacity: 1,},}
Props
Accepts StackView props.
boolean
Checks the checkbox, will be overriden if indeterminate is true
.
boolean
Disables the checkbox component.
string | number
Connects input to its corresponding label’s htmlFor
.
boolean
If true
, puts the checkbox in an indeterminate state.
string | null
Used to label the checkbox. Checkbox must have parent label if left undefined
.
Pass null
to use as a graphical element only, please note you need to provide
additional aria attributes when doing so.
string
Maps to the internal input’s name prop.
(event: React.ChangeEvent<HTMLInputElement>) => void
Maps to the internal input’s onBlur
prop.
(event: React.ChangeEvent<HTMLInputElement>) => void
Maps to the internal input’s onChange
prop.
(event: React.ChangeEvent<HTMLInputElement>) => void
Maps to the internal input’s onFocus
prop.
'xs' | 'sm' | 'md' | 'lg' | 'xl'
Determines the size of the checkbox.
any
Maps to the internal input’s value prop.