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