UNPKG

@mirawision/reactive-hooks

Version:

A comprehensive collection of 50+ React hooks for state management, UI interactions, device APIs, async operations, drag & drop, audio/speech, and more. Full TypeScript support with SSR safety.

23 lines (22 loc) 720 B
export type Boxes = Record<string, boolean>; interface CheckboxBindings { checked: boolean; onChange(e: React.ChangeEvent<HTMLInputElement>): void; } interface UseCheckboxesReturn { values: Boxes; set(key: string, v: boolean): void; toggle(key: string): void; setAll(v: boolean): void; someChecked: boolean; allChecked: boolean; noneChecked: boolean; bind(key: string): CheckboxBindings; } /** * A hook for managing a collection of checkboxes with convenient utilities. * @param initial Initial state of checkboxes * @returns Object containing checkbox values and management functions */ export declare function useCheckboxes(initial?: Boxes): UseCheckboxesReturn; export {};