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';
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