/** * @fileoverview Switch — animated toggle switch with spring physics and size variants. * @module packages/ui/components/ui/switch * @layer core * * @component * @example * import { Switch } from '@saasflare/ui'; * * */ import * as React from "react"; import * as SwitchPrimitive from "@radix-ui/react-switch"; import { type SaasflareComponentProps } from "../../providers"; /** * Props for {@link Switch}. * * Extends the Radix Switch root props with {@link SaasflareComponentProps}, * so `animated` and the other axes can be supplied per-instance or inherited * from . */ interface SwitchProps extends Omit, keyof SaasflareComponentProps>, SaasflareComponentProps { /** Visual size of the toggle. `md` is the standard control; `sm` is a compact variant for dense rows. (`"default"` is a deprecated alias for `"md"`.) */ size?: "sm" | "md" | "default"; } /** * Toggle switch for boolean settings, with a thumb that slides between * states (CSS transform — honors `animated` and reduced motion). Prefer it * over Checkbox when the change takes effect immediately rather than on * form submit. * * @component * @layer core * * @example * */ declare function Switch({ className, size, surface, radius, animated, iconWeight, ...props }: SwitchProps): import("react/jsx-runtime").JSX.Element; export { Switch, type SwitchProps };