@stanfordspezi/spezi-web-design-system
Version:
Stanford Biodesign Digital Health Spezi Web Design System
22 lines (21 loc) • 725 B
TypeScript
import { Switch as SwitchPrimitive } from 'radix-ui';
import { ComponentProps } from 'react';
/**
* A switch component for toggling between two states.
* Built on top of [radix-ui Switch](https://www.radix-ui.com/primitives/docs/components/switch).
*
* @example
* // Basic usage
* <Switch checked={isEnabled} onCheckedChange={setIsEnabled} />
*
* @example
* // With label
* <SideLabel label="Enable notifications">
* <Switch checked={notificationsEnabled} onCheckedChange={setNotificationsEnabled} />
* </SideLabel>
*
* @example
* // Disabled state
* <Switch disabled />
*/
export declare const Switch: ({ className, ...props }: ComponentProps<typeof SwitchPrimitive.Root>) => import("react").JSX.Element;