Skip to main content

Component <Switch />

Props

PropsTypeMeaningPossible values
labelstringAdd switch labelstring
labelPositionstringSet switch label positionleft / right
colorstringSet switch colorred / 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 />