0.7.2 • Published 3 years ago
@slice-and-dice/govuk-react-checkbox v0.7.2
Checkbox
Import
import Checkbox from '@govuk-react/checkbox';
Usage
Simple
<Checkbox>Text displayed next to checkbox</Checkbox>
With disabled state
<Checkbox disabled="disabled">Disabled checkbox option</Checkbox>
Checkbox preselected
<Checkbox defaultChecked>Farm or agricultural waste</Checkbox>
Checkbox preselected & disabled
<Checkbox disabled="disabled" defaultChecked>Farm or agricultural waste</Checkbox>
Checkbox with hint text
<Checkbox hint="including English, Scottish, Welsh and Northern Irish">British</Checkbox>
References:
Properties
Prop | Required | Default | Type | Description |
---|---|---|---|---|
children | true | | node | Text content for checkbox | ||
className | undefined | string | CSS Classname for outermost container | |
hint | undefined | node |