UNPKG

its-just-ui

Version:

ITS Just UI - The easiest and best React UI component library. Modern, accessible, and customizable components built with TypeScript and Tailwind CSS. Simple to use, production-ready components for building beautiful user interfaces with ease.

105 lines (103 loc) 3.67 kB
import { default as React } from 'react'; export interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'onChange'> { checked?: boolean; defaultChecked?: boolean; onChange?: (checked: boolean) => void; disabled?: boolean; required?: boolean; name?: string; value?: string; variant?: 'default' | 'filled' | 'outlined' | 'flat' | 'elevated'; size?: 'sm' | 'md' | 'lg'; status?: 'default' | 'success' | 'warning' | 'error'; label?: React.ReactNode; labelPosition?: 'start' | 'end'; labelSpacing?: string; helperText?: React.ReactNode; errorMessage?: string; transition?: 'none' | 'slide' | 'fade' | 'bounce' | 'smooth'; transitionDuration?: number; loading?: boolean; loadingIcon?: React.ReactNode; containerClassName?: string; containerStyle?: React.CSSProperties; backgroundColor?: string; borderWidth?: string; borderColor?: string; borderStyle?: string; borderRadius?: string; padding?: string; paddingX?: string; paddingY?: string; boxShadow?: string; trackBackgroundColor?: string; trackBackgroundColorChecked?: string; trackBorderWidth?: string; trackBorderColor?: string; trackBorderColorChecked?: string; trackBorderStyle?: string; trackBorderRadius?: string; trackWidth?: string; trackHeight?: string; trackPadding?: string; trackBoxShadow?: string; trackBoxShadowChecked?: string; thumbBackgroundColor?: string; thumbBackgroundColorChecked?: string; thumbBorderWidth?: string; thumbBorderColor?: string; thumbBorderColorChecked?: string; thumbBorderStyle?: string; thumbBorderRadius?: string; thumbSize?: string; thumbBoxShadow?: string; thumbBoxShadowChecked?: string; thumbIcon?: React.ReactNode; thumbIconChecked?: React.ReactNode; thumbIconColor?: string; thumbIconColorChecked?: string; labelColor?: string; labelColorChecked?: string; labelFontSize?: string; labelFontWeight?: string; labelFontFamily?: string; helperTextColor?: string; helperTextFontSize?: string; errorMessageColor?: string; focusRingColor?: string; focusRingWidth?: string; focusRingOffset?: string; focusRingOffsetColor?: string; focusBorderColor?: string; focusBackgroundColor?: string; focusBoxShadow?: string; hoverTrackBackgroundColor?: string; hoverThumbBackgroundColor?: string; hoverBorderColor?: string; hoverBoxShadow?: string; activeTrackBackgroundColor?: string; activeThumbBackgroundColor?: string; activeScale?: string; renderLabel?: (checked: boolean, disabled?: boolean) => React.ReactNode; renderThumb?: (checked: boolean, disabled?: boolean) => React.ReactNode; successColor?: string; warningColor?: string; errorColor?: string; children?: React.ReactNode; } interface SwitchContextValue { checked: boolean; disabled?: boolean; loading?: boolean; size?: 'sm' | 'md' | 'lg'; variant?: 'default' | 'filled' | 'outlined' | 'flat' | 'elevated'; status?: 'default' | 'success' | 'warning' | 'error'; onChange?: (checked: boolean) => void; } export declare const useSwitch: () => SwitchContextValue; declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLInputElement>>; export interface SwitchLabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> { children: React.ReactNode; } declare const SwitchLabel: React.ForwardRefExoticComponent<SwitchLabelProps & React.RefAttributes<HTMLLabelElement>>; export { Switch, SwitchLabel };