Skip to Content

Checkbox

A checkbox allows a user to select multiple items from a list of individual items, or to mark one individual item as selected.

There is not much change in this component as compared to react-aria-components's export. You can refer to the official documentation for more details.

Usage

Disabled

Sizes

Colours

Indeterminate

The isIndeterminate prop sets a Checkbox to an indeterminate state, overriding its appearance and maintaining it until set to false, regardless of user interaction.

Slots

  • base: Checkbox wrapper, it handles alignment, placement, and general appearance.
  • box: The pseudo component that represents the checkbox state. Includes styles for relative positioning, flex properties, overflow handling and managing hover and selected states.
  • icon: Icon within the checkbox, controlling size, visibility, and changes when checked.

Custom Styles

You can customize the Checkbox component by passing custom Tailwind CSS classes to the component slots.