Accessible binary toggle with recessed well track and sculpted beveled thumb.
"use client"; import { useState } from "react";import { Switch } from "@/components/compose/switch"; export function ToggleDemo() { const [enabled, setEnabled] = useState(true); return <Switch checked={enabled} onCheckedChange={setEnabled} />;}Add it with the ComposeUI CLI, or copy the source manually.
checkedbooleanControlled checked state of the switch track.
falseonCheckedChange(checked: boolean) => voidCallback fired when the user clicks or toggles via keyboard.
aria-labelstringAccessible name announced to assistive technologies.
Updated December 2026