Checkboxes are offered with the following property variables:
Prop | Type | Default | Notes |
---|---|---|---|
size | string | small | Can be small or large |
name | string | N/A | Required prop |
value | string | N/A | Required prop |
disabled | boolean | false | Will disable checkbox input |
index | number | N/A | Required for keyboard accessibility (only when
used without CheckBoxGroup) |
onClick | function | N/A | Click handler (required when used without CheckBoxGroup) |
isChecked | boolean or
'indeterminate' | N/A | Defines if checked or indeterminate (required when
used without CheckBoxGroup) |
<div>
<CheckBoxButton
name='Regular'
size='large'
value='regular'
>
Regular Checkbox
</CheckBoxButton>
<CheckBoxButton
disabled
name='Regular'
size='large'
value='regular'
>
Regular Disabled Checkbox
</CheckBoxButton>
</div>
<div>
<CheckBoxButton
name='test'
value='test'
>
Small Checkbox
</CheckBoxButton>
<CheckBoxButton
disabled
name='test'
value='test'
>
Small Disabled Checkbox
</CheckBoxButton>
</div>