Edit page

Switch

A skin on a checkbox.

Import Syntax

Basic Usage

Alternate Styles

destructive
labelPosition='before'

fullWidth

with Formik

{
  "mfa": false
}

Props

PropertyTypeRequiredDefaultDescription
labelPositionEnumfalseafterPosition of the label text in relation to the input.
childrenNodefalse-The text label of the Switch.
nameStringfalse-The name to be shared among Switches in a group.
checkedBoolfalse-Whether the Switch is currently checked.
onChangeFuncfalse-Event called when the Switch value should be toggled.
destructiveBoolfalse-Should use a red highlight color.
fullWidthBoolfalse-Switch and label will take up the full width of the container