Checkbox

Displays a boolean value.

Default

Change state with checked props.

sizes

Checkbox of different sizes.

disable

group

Manage a set of Checkbox.

APIs

Checkbox.Props

AttributeDescriptionTypeAccepted valuesDefault
checkedchecked or notboolean--
initialCheckedchecked or not on initialboolean-false
onChangechange event handlerCheckboxEvent--
valueunique identification value (only in group)string--
disableddisable checkboxboolean-false
sizecheckbox sizeNormalSizesNormalSizessmall
...native propsLabelHTMLAttributes'form', 'className', ...-

Checkbox.Group.Props

AttributeDescriptionTypeAccepted valuesDefault
valuechecked childrenArray<string>-[]
disableddisable checkbox groupboolean-false
onChangechange event handler(values: string[]) => void--
sizesize of all checkboxes in the groupNormalSizesNormalSizessmall
...native propsHTMLAttributes'id', 'className', ...-

NormalSizes

type NormalSizes = 'mini' | 'small' | 'medium' | 'large'

CheckboxEvent

interface CheckboxEventTarget {
  checked: boolean
}

export interface CheckboxEvent {
  target: CheckboxEventTarget
  stopPropagation: () => void
  preventDefault: () => void
  nativeEvent: React.ChangeEvent
}