Lambda UI
v1.3.4
Stable

Switch

Switch is a form component that lets users select a boolean value.

Playground

Experiment with all the properties of the Switch component in real time.

Properties
label

Optional text label for the switch.

positionLabel

Controls the position of the label relative to the switch.

color

Controls the color of the switch when active.

variant

Defines the visual style of the switch.

shape

Defines the shape of the switch.

size
Medium

Controls the overall switch size.

disabled

Disables user interaction with the switch.

Usage

import { Switch } from "lambda-ui-components";


export default function App() {
	return (
		<Switch  />
	);
}

Controlledvalue

Controls the value of the switch.

API Reference

Props

Prop
Default
Type
checked
false
boolean
onCheckedChange
undefined
(checked: boolean) => void
label
undefined
string
positionLabel
"right"
"left" | "right" | "top" | "bottom"
size
"medium"
"tiny" | "small" | "medium" | "large"
color
"primary"
"neutral" | "primary" | "secondary" | "danger" | "success" | "warning" | "info"
variant
"solid"
"solid" | "soft" | "outline"
shape
"rounded"
"square" | "subtle" | "rounded"
disabled
false
boolean
The modern React component library.
© 2026 Lambda UI. Made with in Mexico by AletzMan.