Switch

A simple switch to select one of two values.

By default it will be created with the first value of `values`, or you can pass the `value` prop to control it.

Passing a `theme` it is possible to style it.

Choose an example

Events

toggled
[payload]

Usage

<Switch
  value='Off'
  values={['Off', 'On']}
/>

Props

value

    "Off"

values

    (2) [ "Off" ,"On" ]
    • 0: "Off"
    • 1: "On"
    • length: 2
Off On