Checkbox

<Checkbox>TailwindCSS Modules

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

InstallationColoxo CLI
npx coloxo add checkbox --style coloxo-css
ES Module ImportPlayground / npm package
import { Checkbox } from '@coloxo/ui';

Design Tokens:

--cx-brand-600: #2348FF--cx-border-primary: #E2E8F0--cx-radius-sm: 4pxsize: 16px

1. Variant Matrix

Checkboxes support descriptions, indeterminate states, and disabled states natively.

DefaultIndeterminateDisabled
States

Shown on the employee card

2. Interactive Props Configurator

Checked State

Show Description

Disabled State

Visual Render Canvas

Shown on the employee card

tsx
<Checkbox  label="Remote eligible"  description="Shown on the employee card"/>

3. Dark theme

Checkbox borders and text contrast automatically adapt in dark mode.

Shown on the employee card

4. Enterprise layout compositions

Checkboxes are often stacked in lists or used as bulk-select toggles in data tables.

Notification Preferences

Receive a daily summary of activity.

Get pinged immediately on your phone.

Only for critical system outages.

Accessibility

Radix UI Primitives

Checkbox relies on Radix UI Checkbox primitives, ensuring it acts as a native checkbox with spacebar toggling and correct ARIA states.

Linked Labels

The label text is automatically linked via an ID to the checkbox input, meaning clicking the text toggles the checkbox and screen readers announce the label.

Props

NameTypeDefaultDescription
labelReactNode—Main checkbox label.
descriptionReactNode—Additional context text below the label.
checkedboolean—Controlled checked state.
indeterminateboolean—Mixed selection state (displays dash).
disabledboolean—Disabled state.
errorReactNode—Validation message or error state.