Switch

Switch

Tactile toggle switch with accessible role="switch" semantics and optional label/description pairing.

Interactive Playground

Tactile toggle switch with subtle violet glow when active.

Size

Sizes & Descriptions

Pair switches with labels and helper descriptions for clean settings panels.

Quick Import

Example.tsxtsx
1import { Switch } from "@rekodo/react";
2
3export function Example() {
4 return <Switch defaultChecked label="Mechanical Tonearm" />;
5}

API Reference

Props accepted by this component.

PropTypeDefaultDescription
checkedbooleanundefinedControlled checked state.
defaultCheckedbooleanfalseInitial uncontrolled checked state.
onCheckedChange(checked: boolean) => voidundefinedCalled when toggled.
size"sm" | "default" | "lg""default"Switch track and thumb dimensions.
label / descriptionstringundefinedOptional accessible label and helper text.