Checkbox

Checkbox UI Component

Checkbox component

Based on Ant Design Checkbox

API

PropertyDescriptionTypeDefault
autoFocusGet focus when component mountedbooleanfalse
checkedSpecifies whether the checkbox is selected.booleanfalse
defaultCheckedSpecifies the initial state: whether or not the checkbox is selected.booleanfalse
descriptionCheckbox descriptionstring-
disabledDisable checkboxbooleanfalse
errorTextError message, if provided sets error state on checkboxstring-
hasErrorDetermines if checkbox is in error statebooleanfalse
indeterminateIndeterminate checked state of checkboxbooleanfalse
onChangeThe callback function that is triggered when the state changes.(e:Event)=>void-
withoutPaddingReset padding of CheckboxWrapperbooleanfalse

Checkbox Group

PropertyDescriptionTypeDefault
defaultValueDefault selected valuestring / number / boolean /string[] / number[] / boolean[][]
disabledDisable all checkboxesbooleanfalse
nameThe name property of all input[type="checkbox"] childrenstring-
optionsSpecifies optionsstring / number / boolean /string[] / number[] / boolean[][]
valueUsed for setting the currently selected value.string / number / boolean /string[] / number[] / boolean[][]
onChangeThe callback function that is triggered when the state changes.(value: string / number / boolean) => void-

Methods

Checkbox

NameDescription
blur()remove focus
focus()get focus