Checkbox

Displays a boolean value.

General

Change state with checked props.

Sizes

Checkbox of different sizes.

Type

Differentiate states by color.

Disable

Unusable and un-clickable Checkbox.

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
typecurrent typeCheckboxTypesCheckboxTypesdefault
refforwardRefRef<HTMLInputElement | null>--
...native propsLabelHTMLAttributes'form' ...-

Checkbox.Group.Props

AttributeDescriptionTypeAccepted valuesDefault
valuechecked childrenArray<string>-[]
disableddisable checkbox groupboolean-false
onChangechange event handler(values: string[]) => void--
...native propsHTMLAttributes'id', ...-

CheckboxTypes

type CheckboxTypes =
  | 'default'
  | 'primary'
  | 'secondary'
  | 'success'
  | 'warning'
  | 'error'
  | 'info'

CheckboxEvent

interface CheckboxEventTarget {
  checked: boolean
}

export interface CheckboxEvent {
  target: CheckboxEventTarget
  stopPropagation: () => void
  preventDefault: () => void
  nativeEvent: React.ChangeEvent
}
Edit this page on GitHub

Previous

Card

Next

Code

MADE & DESIGNED WITHBY BRUNO ANDRADE
docs background gradient blue
docs background gradient violet