Checkbox
<Checkbox>TailwindCSS ModulesA control that allows the user to toggle between checked, unchecked, and indeterminate states.
npx coloxo add checkbox --style coloxo-cssimport { Checkbox } from '@coloxo/ui';Design Tokens:
1. Variant Matrix
Checkboxes support descriptions, indeterminate states, and disabled states natively.
| Default | Indeterminate | Disabled | |
|---|---|---|---|
| States | Shown on the employee card |
2. Interactive Props Configurator
Checked State
Show Description
Disabled State
Shown on the employee card
<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
Checkbox relies on Radix UI Checkbox primitives, ensuring it acts as a native checkbox with spacebar toggling and correct ARIA states.
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
| Name | Type | Default | Description |
|---|---|---|---|
| label | ReactNode | — | Main checkbox label. |
| description | ReactNode | — | Additional context text below the label. |
| checked | boolean | — | Controlled checked state. |
| indeterminate | boolean | — | Mixed selection state (displays dash). |
| disabled | boolean | — | Disabled state. |
| error | ReactNode | — | Validation message or error state. |