forms · @awesome-ds/react
Checkbox
Binary choice with label.
State matrix
unchecked
checked
disabled
Anatomy
- native checkbox
- visible label
- optional description
Keyboard contract
Space toggles the focused checkbox; Tab moves to the next control.
Screen-reader contract
Announces checkbox name, checked/mixed state, and disabled state.
Content rules
- Write the label as a selectable statement.
- Use a group legend for related choices.
Public API
| Prop | Type | required | Description |
|---|---|---|---|
id | string | required | Association identifier |
label | string | required | Choice label |
…native | Omit<InputHTMLAttributes<HTMLInputElement>, "type"> | — | Native checkbox attributes |
Adaptation contracts
- RTL
- Keep label, input, hint, and error aligned to inline-start without changing DOM order.
- High contrast
- Use system field borders, focus indicators, and non-color invalid cues.
- Reduced motion
- Change validation and selection states without sliding or spring motion.
Verification IDs
Live
Live
Copyable example
import { Checkbox } from "@awesome-ds/react";
<Checkbox id="tos" label="Accept terms" />