UNPKG

@syncfusion/react-buttons

Version:

Syncfusion React Buttons package is a feature-rich collection of UI components including Button, CheckBox, RadioButton, Switch, Chip, and more for building modern, interactive React applications.

28 lines (27 loc) 1.06 kB
import { InputHTMLAttributes, ForwardRefExoticComponent, RefAttributes } from 'react'; import { SwitchProps } from './types'; /** * Interface for the Switch component ref instance */ export interface ISwitch extends SwitchProps { /** * The hidden `<input type="checkbox" role="switch">` DOM node. * * @private */ element?: HTMLInputElement | null; } type ISwitchProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'size'> & ISwitch; /** * The Switch component is a binary toggle control for settings and standalone options * that take immediate effect. It follows the Material Design 3 specification. * * ```typescript * import { Switch } from "@syncfusion/react-buttons"; * * <Switch checked={true} label="Dark mode" /> * ``` */ export declare const Switch: ForwardRefExoticComponent<ISwitchProps & RefAttributes<ISwitch>>; declare const _default: import("react").NamedExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "onChange"> & ISwitch & RefAttributes<ISwitch>>; export default _default;