Component <Checkbox />
Props
Props | Type | Meaning | Possible values |
---|---|---|---|
label | string / node | Add checkbox label | string or element |
labelPosition | string | Set checkbox label position | left / right |
color | string | Set checked color | red / blue / turquoise |
customInput | node | Prop for custom input element | element |
States
Examples:
<Checkbox checked />
<Checkbox checked={false} />
<Checkbox checked disabled />
<Checkbox checked={false} disabled />
Colors
Examples:
<Checkbox color="red" checked />
<Checkbox color="blue" checked />
<Checkbox color="turquoise" checked />
With label
Examples:
<Checkbox label="Agree?" labelPosition="left" checked />
<Checkbox label="With this too?" labelPosition="right" checked />
Custom input
Example:
<Checkbox customInput={<input type="checkbox" name="check" checked />} />