Skip to main content

Component <Checkbox />

Props

PropsTypeMeaningPossible values
labelstring / nodeAdd checkbox labelstring or element
labelPositionstringSet checkbox label positionleft / right
colorstringSet checked colorred / blue / turquoise
customInputnodeProp for custom input elementelement



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 />} />