Checkbox

Checkbox is a component used for allowing users to select multiple values from multiple options.

Usage

import { Checkbox, CheckboxGroup } from "@yamada-ui/react"
<Checkbox />
<CheckboxGroup.Root>
  <CheckboxGroup.Item />
</CheckboxGroup.Root>

Group

Use Items

Change Variant

Change Size

Set Default Value

To set a default value, set defaultValue to an array of values.

Default Checked

To default checked, set defaultChecked to true.

Indeterminate

To make indeterminate, set indeterminate to true.

Max Selection

To limit the maximum number of selections, set max to a number.

Change Direction

To change the direction, set orientation to "horizontal" or "vertical". The default is "vertical".

Change Shape

To change the shape, set shape to "rounded" or "square". The default is "rounded".

Disable

To disable, set disabled to true.

Read-Only

To read-only, set readOnly to true.

Invalid

To make invalid, set invalid to true.

Change Border Color

To change the border color, set focusBorderColor or errorBorderColor to a color value.

Customize Icon

To customize icon, set checkedIcon to a ReactNode.

Use Custom Component

Control

Props

Accessibility

Currently, this section is being updated due to the migration of v2.