Checkbox
A choice that can be on or off.
On this device only.
import { Checkbox } from '@rajatweb/argent'
<Checkbox label="Send me updates" onCheckedChange={setUpdates} />Props
| Prop | Type | Default | What it does |
|---|---|---|---|
label required | string | ||
checked | boolean | ||
defaultChecked | boolean | ||
disabled | boolean | ||
hint | string | ||
onCheckedChange | (checked: boolean) => void |
Accessibility
- The label is part of the target.
Do
- Word it so that checked means yes.
Don’t
- Use it for settings that apply at once. Use a Switch.