Skip to main content

Checkbox

Implementation#

import { Checkbox } from "slipstream-ui";
const Example = () => <Checkbox >Checkbox Label<Checkbox>;

Default#

Example
<FormGroup>
<Checkbox id="CheckboxID">Checkbox Label</Checkbox>
</FormGroup>

Color#

Example
<Checkbox color="default">...</Checkbox>
<Checkbox color="primary">...</Checkbox>
<Checkbox color="success">...</Checkbox>
<Checkbox color="warning">...</Checkbox>
<Checkbox color="danger">...</Checkbox>

Validation#

Example
<Checkbox invalid>...</Checkbox>
<Checkbox disabled>...</Checkbox>

Required#

Example
<Checkbox required>...</Checkbox>

Size#

Example
<Checkbox size="lg">...</Checkbox>

Right-To-Left (rtl)#

Example
<Checkbox rtl>...</Checkbox>

Props#

AttributeTypeValueDefault ValueDescription
idstringMatches the label in connection with the checkbox (htmlFor/id)
sizestringmd/lgmdUI size of Checkbox and Label
colorstringdanger/default/primary
success/warning/invalid
primaryColor of Checkbox when checked
invalidbooleantrue/falseRed text for Checkbox's label
disabledbooleantrue/falseDisabled the element from user interaction
requiredbooleantrue/falseSet the Checkbox as required and update Label UI to required
rtlbooleantrue/falseWhen true, sets element to direction of right-to-left (rtl)
labelPropsLabelPropsPass in props you find useful for the Label component