Skip to main content

Switch

Switch is a form control for turning a setting on or off, like enabling email updates or autosave. It pairs a sliding toggle with a visible label, and people click or tap either one to flip it.

Import

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

Allied components

Other links

Switch props
PropTypeDefaultAttributes
children
React.ReactNode
No default value
id
string
No default value
name
string
No default value
disabled
boolean
false
labelAfter
boolean
false
size
union
md
onChange
callback
No default value
onFocus
callback
No default value
onBlur
callback
No default value
className
union
No default value
attributes
object
No default value
inputAttributes
object
No default value
defaultChecked
boolean
false
checked
boolean
No default value