UNPKG

aura-glass

Version:

A comprehensive glassmorphism design system for React applications with 142+ production-ready components

49 lines 1.84 kB
import React from "react"; export interface GlassSwitchProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onChange"> { /** Whether the switch is checked */ checked?: boolean; /** Whether the switch is checked by default (uncontrolled) */ defaultChecked?: boolean; /** Callback when the switch state changes */ onChange?: (checked: boolean) => void; /** Alias for onChange for compatibility */ onCheckedChange?: (checked: boolean) => void; /** Size of the switch */ size?: "sm" | "md" | "lg"; /** Visual variant */ variant?: "default" | "success" | "warning" | "error" | "info"; /** Label text */ label?: string; /** Description text */ description?: string; /** Position of label relative to switch */ labelPosition?: "left" | "right" | "top" | "bottom"; /** Whether the switch is disabled */ disabled?: boolean; /** Loading state */ loading?: boolean; /** Icons for on/off states */ icons?: { checked?: React.ReactNode; unchecked?: React.ReactNode; }; /** Whether to show focus ring */ focusRing?: boolean; /** Custom thumb content */ thumbContent?: React.ReactNode; /** Error message */ error?: string; /** Whether the switch is required */ required?: boolean; /** Respect user's motion preferences */ respectMotionPreference?: boolean; /** Accessible label for the switch */ "aria-label"?: string; /** ID of element that labels the switch */ "aria-labelledby"?: string; /** ID of element(s) that describe the switch */ "aria-describedby"?: string; } export declare const GlassSwitch: React.ForwardRefExoticComponent<GlassSwitchProps & React.RefAttributes<HTMLButtonElement>>; export default GlassSwitch; //# sourceMappingURL=GlassSwitch.d.ts.map