Toggle form field that takes a name and an optional children label, with an onChange handler. Supports a reversed label position, three sizes, controlled and uncontrolled modes via checked/defaultChecked, and a disabled state.
import { Reshaped, View } from "reshaped/bundle"; import Switch from "@/components/ui/reshaped-switch"; export default function Demo() { return ( <Reshaped theme="slate"> <div style={{ maxWidth: 320, width: "100%", margin: "0 auto", padding: 24 }}> <View gap={3}> <Switch name="switch" size="small"> Open connection </Switch> <Switch name="switch">Turn on notifications</Switch> <Switch name="switch" size="large"> Standby </Switch> </View> </div> </Reshaped> ); }