Last updated: 2.0.0 (18/01/2024)
Last updated 1 year ago
Was this helpful?
import { Switch } from "@valence-ui/core"; function MyComponent() { const [value, setValue] = React.useState(false); return ( <Switch value={value} setValue={setValue} label="My switch!" /> ) }
Extends .
label
string
The label associated with this input.
grow
boolean
Shorthand for flex-grow = 1.
flex-grow = 1
buttonProps
PrimitiveButtonProps
Optional props to pass to the Button container component.
Button
labelProps
TextProps
Optional props to pass to the Text label component.
Text
GenericInputProps<boolean>