UNPKG

@als-tp/als-react-ts-ui

Version:

A comprehensive React TypeScript UI component library built with Base UI by ALSInnovation

46 lines 1.64 kB
import * as React from "react"; /** * Props for the ALSToggleGroup component */ export interface ALSToggleGroupProps<T = unknown> { /** Controlled value - array of pressed toggle values */ value?: T[]; /** Default value (uncontrolled) - array of pressed toggle values */ defaultValue?: T[]; /** Callback when the pressed states change */ onValueChange?: (groupValue: T[]) => void; /** Whether multiple toggles can be pressed simultaneously */ multiple?: boolean; /** Whether the toggle group is disabled */ disabled?: boolean; /** Orientation of the toggle group */ orientation?: "horizontal" | "vertical"; /** Whether to loop keyboard focus */ loopFocus?: boolean; /** Size variant for child toggles */ size?: "sm" | "md" | "lg"; /** Visual variant */ variant?: "default" | "primary" | "success" | "error"; /** Additional CSS class */ className?: string | ((state: { disabled: boolean; }) => string | undefined); /** Inline styles */ style?: React.CSSProperties; /** Children - should be Toggle components */ children?: React.ReactNode; } /** * ALSToggleGroup - Provides shared state to a series of toggle buttons * * @example * ```tsx * <ALSToggleGroup defaultValue={['left']}> * <Toggle value="left">Left</Toggle> * <Toggle value="center">Center</Toggle> * <Toggle value="right">Right</Toggle> * </ALSToggleGroup> * ``` */ export declare const ALSToggleGroup: React.ForwardRefExoticComponent<ALSToggleGroupProps<unknown> & React.RefAttributes<HTMLDivElement>>; //# sourceMappingURL=ALSToggleGroup.d.ts.map