import Checkbox from '@precursor/checkbox';Example
import Checkbox from '@precursor/checkbox';
export default function Example() {
return <Checkbox name="updates" label="Send me updates" defaultChecked />;
}
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
labelRequired | string | — | — |
defaultChecked | boolean | — | — |
className | string | — | — |
aria-describedby | string | — | — |
aria-invalid | boolean | — | — |
disabled | boolean | — | — |
id | string | — | — |
nameRequired | string | — | — |
placeholder | string | — | — |
type | InputTypes | — | — |
defaultValue | string | — | — |
value | string | — | — |
checked | boolean | — | — |
state | "success" | "error" | "warning" | — | — |
size | "s" | "m" | "l" | — | — |
onChange | ChangeEventHandler<HTMLInputElement> | — | — |