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.
booleanChecks the checkbox, will be overriden if indeterminate is true.
booleanDisables the checkbox component.
string | numberConnects input to its corresponding label’s htmlFor.
booleanIf true, puts the checkbox in an indeterminate state.
string | nullUsed 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.
stringMaps to the internal input’s name prop.
(event: React.ChangeEvent<HTMLInputElement>) => voidMaps to the internal input’s onBlur prop.
(event: React.ChangeEvent<HTMLInputElement>) => voidMaps to the internal input’s onChange prop.
(event: React.ChangeEvent<HTMLInputElement>) => voidMaps to the internal input’s onFocus prop.
'xs' | 'sm' | 'md' | 'lg' | 'xl'Determines the size of the checkbox.
anyMaps to the internal input’s value prop.