/** * A object that contains different breakpoints */ export type Breakpoints = Record; export interface UseBreakpointsOptions { /** * The query strategy to use for the generated shortcut methods like `.lg` * * 'min-width' - .lg will be true when the viewport is greater than or equal to the lg breakpoint (mobile-first) * 'max-width' - .lg will be true when the viewport is smaller than the xl breakpoint (desktop-first) * * @defaultValue "min-width" */ strategy?: 'min-width' | 'max-width'; } export type UseBreakpointsReturns = Record & { /** * The current breakpoints states */ breakpoints: Record; /** * Check if the viewport is greater than the given breakpoint * * @param {K} k - `K`, the breakpoint key * @returns {boolean} `boolean`, whether the viewport is greater than the given breakpoint */ isGreater: (k: K) => boolean; /** * Check if the viewport is greater or equal to the given breakpoint * * @param {K} k - `K`, the breakpoint key * @returns {boolean} `boolean`, whether the viewport is greater or equal to the given breakpoint */ isGreaterOrEqual: (k: K) => boolean; /** * Check if the viewport is smaller than the given breakpoint * * @param {K} k - `K`, the breakpoint key * @returns {boolean} `boolean`, whether the viewport is smaller than the given breakpoint */ isSmaller: (k: K) => boolean; /** * Check if the viewport is smaller or equal to the given breakpoint * * @param {K} k - `K`, the breakpoint key * @returns {boolean} `boolean`, whether the viewport is smaller or equal to the given breakpoint */ isSmallerOrEqual: (k: K) => boolean; /** * Check if the viewport is between the given breakpoints * * @param {K} a - `K`, the breakpoint key * @param {K} b - `K`, the breakpoint key * @returns {boolean} `boolean`, whether the viewport is between the given breakpoints */ isInBetween: (a: K, b: K) => boolean; /** * The current matched breakpoints */ currents: K[]; }; /** * five breakpoints by default, align with tailwindcss breakpoints * * @see {@link https://tailwindcss.com/docs/responsive-design | Tailwind CSS - Responsive Design} * */ export declare const defaultBreakpoints: { sm: number; md: number; lg: number; xl: number; xxl: number; }; /** * A React Hook that provides a simple API to interact with the viewport breakpoints. * * @param {Breakpoints} [breakpoints=defaultBreakpoints] - `Breakpoints`, the breakpoints to use, see {@link Breakpoints} and {@link defaultBreakpoints} * @param {UseBreakpointsOptions} [options={}] - `UseBreakpointsOptions`, options to configure the hook, see {@link UseBreakpointsOptions} * @returns {UseBreakpointsReturns} `UseBreakpointsReturns`, see {@link UseBreakpointsReturns} */ export declare function useBreakpoints(breakpoints?: Breakpoints, options?: UseBreakpointsOptions): UseBreakpointsReturns;