structyl

Checkbox

stable

A control that allows the user to toggle between checked, not checked, and indeterminate.

Basic usage

Examples

Indeterminate state

Use the indeterminate state for a "select all" parent checkbox.

Checked, unchecked and indeterminate

Checkbox supports standard and indeterminate states for bulk selection flows.

Semantic colors

Use the color prop to visually reinforce the meaning of each checkbox option.

Features

  • Supports indeterminate state.
  • Full keyboard navigation.
  • Can be controlled or uncontrolled.

Installation

bash
pnpm dlx structyl add checkbox

API Reference

Checkbox API reference

Full props, types, defaults, and all 2 parts.

View API

Keyboard interactions

Adheres to the WAI-ARIA design pattern .

KeyDescription
SpaceToggles the checkbox.
Checkbox | structyl