UNPKG

@arolariu/components

Version:

🎨 70+ beautiful, accessible React components built on Radix UI. TypeScript-first, tree-shakeable, SSR-ready. Perfect for modern web apps, design systems & rapid prototyping. Zero config, maximum flexibility! ⚡

29 lines • 793 B
type WindowSize = { width: number | null; height: number | null; }; type HookReturnType = Readonly<{ windowSize: WindowSize; isMobile: boolean; isDesktop: boolean; }>; /** * Client hook to get the window size and whether the window is mobile or desktop. * @returns An object containing the window size and whether the window is mobile or desktop. *@example * ```tsx * function MyComponent() { * const { windowSize, isMobile, isDesktop } = useWindowSize(); * * return ( * <div> * <p>Window Size: {windowSize.width} x {windowSize.height}</p> * <p>{isMobile ? 'Mobile View' : 'Desktop View'}</p> * </div> * ); * } * ``` */ export declare function useWindowSize(): HookReturnType; export {}; //# sourceMappingURL=useWindowSize.d.ts.map