Usage
import { Switch } from "lambda-ui-components";
export default function App() {
return (
<Switch />
);
}Switch is a form component that lets users select a boolean value.
Experiment with all the properties of the Switch component in real time.
Optional text label for the switch.
Controls the position of the label relative to the switch.
Controls the color of the switch when active.
Defines the visual style of the switch.
Defines the shape of the switch.
Controls the overall switch size.
Disables user interaction with the switch.
import { Switch } from "lambda-ui-components";
export default function App() {
return (
<Switch />
);
}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 |