Props
checked?: booleanCurrent on/off state.
onChange?: (checked: boolean) => voidCalled when the toggle changes.
label?: stringOptional label rendered to the right of the switch.
disabled?: booleanDisables the switch and lowers its emphasis.
className?: stringOptional class name for the switch wrapper.
Example
Switch.tsx
import { useState } from 'react';
import { Switch } from '@meteorack/sdk-react';
export function FeatureToggle() {
const [enabled, setEnabled] = useState(true);
return (
<Switch
label="Enable realtime sync"
checked={enabled}
onChange={setEnabled}
/>
);
}