goobs-frontend
Version:
A comprehensive React-based libary for building modern web applications
56 lines • 2.11 kB
TypeScript
import { default as React } from 'react';
export interface SwitchStyles {
/** Theme selection: 'light', 'dark' (default), or 'sacred'. */
theme?: 'light' | 'dark' | 'sacred';
/** Whether to show outline. */
outline?: boolean;
/** Custom track width. */
trackWidth?: string;
/** Custom track height. */
trackHeight?: string;
/** Custom track background color. */
trackBackground?: string;
/** Custom track border color. */
trackBorderColor?: string;
/** Custom track border radius. */
trackBorderRadius?: string;
/** Custom thumb size. */
thumbSize?: string;
/** Custom thumb background color. */
thumbBackground?: string;
/** Custom thumb border color. */
thumbBorderColor?: string;
/** Custom label color. */
labelColor?: string;
/** Custom label font family. */
labelFontFamily?: string;
/** Custom label font size. */
labelFontSize?: string;
/** Custom label font weight. */
labelFontWeight?: string | number;
/** Custom transition duration (e.g. '250ms'). */
transitionDuration?: string;
/** Custom checked track color. */
checkedTrackColor?: string;
/** Custom checked thumb color. */
checkedThumbColor?: string;
/** Set false to suppress the focus-visible ring (data-focus-effects). */
focusEffects?: boolean;
}
export interface SwitchProps extends React.InputHTMLAttributes<HTMLInputElement> {
/** Label text to display on the left side of the switch */
leftLabel?: string;
/** Label text to display on the right side of the switch */
rightLabel?: string;
/** Comprehensive styling options including theme, custom colors, and layout properties */
styles?: SwitchStyles;
}
/**
* Toggle switch with optional left/right labels and light/dark/sacred theming
* (the sacred variant renders glyph thumb content plus a shimmer). Auto-binds
* its boolean value by `name` inside a goobs `<Form>`; otherwise controlled via
* `checked`.
*/
declare const Switch: React.FC<SwitchProps>;
export default Switch;
//# sourceMappingURL=index.d.ts.map