Components
Switch
Toggle a single boolean setting
Switch
Switch is intended for settings that take effect immediately when enabled or disabled.
import { Label, Switch } from "@downcity/ui";
export function PreviewSwitch() {
return (
<Label>
Live preview
<Switch defaultChecked aria-label="Enable live preview" />
</Label>
);
}The host owns persistence. The component provides controlled, uncontrolled, form, and keyboard behavior.