Skip to main content

Switch

Switch is a form control that lets people turn a setting on or off, such as email updates or autosave.

Import

import { Switch } from '@vortexlabs/vortex-native';
import type { SwitchProps } from '@vortexlabs/vortex-native';

Other links

Switch

Switch props
PropTypeDefaultAttributes
children
React.ReactNode
No default value
name
string
No default value
helperText
React.ReactNode
No default value
disabled
boolean
false
labelAfter
boolean
false
size
union
md
layout
union
default
divider
boolean
true
onChange
callback
No default value
style
object
No default value
attributes
InteractiveAttributes
No default value
defaultChecked
boolean
false
checked
boolean
No default value