Switch

The Switch component is used as a Checkbox alternative.

Usage

import { Switch } from '@binarycapsule/ui-capsules';

Knobs 🎛

large
<Switch
  onChange={function}
>
  Hello world
</Switch>

Props

NameDescription
checked
Required
boolean
The checked state of the switch.
onChange
Required
function
The function to handle the onChange event.
disabled
boolean(Default: false)
The disabled state of the switch.
size
"small" | "medium" | "large"(Default: "medium")
The size of the switch.
children
string(Default: null)
The switch label.