maz-ui
Version:
A standalone components library for Vue.Js 3 & Nuxt.Js 3
39 lines (38 loc) • 1.48 kB
TypeScript
import { UseWindowSizeOptions } from './useWindowSize';
export interface UseBreakpointsOptions extends UseWindowSizeOptions {
initialWidth?: number;
initialHeight?: number;
/**
* Listen to window `orientationchange` event
*
* @default true
*/
listenOrientation?: boolean;
/**
* Whether the scrollbar should be included in the width and height
* @default true
*/
includeScrollbar?: boolean;
/**
* List of breakpoints in format `{ [key: string]: string }` (e.g. `{ 'sm': '640px', 'md': '768px' }`)
*/
breakpoints: Record<string, string> | Record<string, number>;
/**
* Is the breakpoint when the screen is considered not medium (tablet - e.g. `md`)
* @default 'md'
*/
mediumBreakPoint?: string;
/**
* Is the breakpoint when the screen is considered not medium (laptop - e.g. `lg`)
* @default 'lg'
*/
largeBreakPoint?: string;
}
export declare function useBreakpoints({ initialWidth, initialHeight, includeScrollbar, internalWindow, listenOrientation, breakpoints, mediumBreakPoint, largeBreakPoint, }: UseBreakpointsOptions): {
width: import('vue').Ref<number, number>;
numericBreakpoints: Record<string, number>;
isSmallScreen: import('vue').ComputedRef<boolean>;
isLargeScreen: import('vue').ComputedRef<boolean>;
isMediumScreen: import('vue').ComputedRef<boolean>;
breakpoints: Record<string, string> | Record<string, number>;
};