UNPKG

@flexilla/collapsible

Version:

A utility for creating collapsible sections in web applications, conserving space and improving user experience.

23 lines (19 loc) 893 B
/** * Collapses an element to the specified height * @param element - The HTML element to collapse * @param closeHeight - Height of the element when closed (default: "0px") */ export declare const collapseElement: (element: HTMLElement, closeHeight?: string) => void; /** * Expands a collapsible element to its full height * @param element - The HTML element to expand */ export declare const expandElement: (element: HTMLElement) => void; /** * Initializes a collapsible element with the specified state and height * @param element - The HTML element to initialize as collapsible * @param state - Initial state of the element ('open' or 'close') * @param closeHeight - Height of the element when closed (by default: "0px") */ export declare const initCollapsible: (element: HTMLElement, state?: "open" | "close", closeHeight?: string) => void; export { }