GitHub

Checkbox

A control element that allows for multiple selections within a set

You'll receive a notification when someone posts a comment

Installation

Usage

Controlled

Use the checked prop to control the checkbox.

Terms were not accepted

Invalid State

Use the invalid prop to indicate an invalid state.

You must accept the terms to continue

You can pass invalid prop to the <Field /> to disable the label and description or <Checkbox /> to disable just the checkbox.

Examples

With Description

Use <FieldDescription /> to add a description to the checkbox.

You'll receive a notification when someone posts a comment on your post

Disabled

Use the disabled prop to disable the checkbox.

Indeterminate

Use the checked="indeterminate" prop to set the checkbox to an indeterminate state.

Group

Use <CheckboxGroup /> to group multiple checkboxes together.

Show these items on the desktop:

Select the items you want to show on the desktop.

Use defaultValue to set the default checked values.

Card Style

Use <FieldLabel /> to add a label to the checkbox.

API Reference

Checkbox

Root element of the checkbox. Renders a button

CheckboxGroup

Container for a group of checkboxes. Renders a div


For a complete list of props, see the Ark UI documentation.