Component <Switch />
Props
Props | Type | Meaning | Possible values |
---|---|---|---|
label | string | Add switch label | string |
labelPosition | string | Set switch label position | left / right |
color | string | Set switch color | red / blue / turquoise |
States
Examples:
<Switch checked />
<Switch checked={false} />
<Switch checked disabled />
<Switch checked={false} disabled />
With label
Examples:
<Switch label="Are you ok?" labelPosition="left" checked />
<Switch label="No?" labelPosition="right" />
Color
Examples:
<Switch color="red" checked />
<Switch color="blue" checked />
<Switch color="turquoise" checked />