UNPKG

@arolariu/components

Version:

🎨 60+ 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! ⚡

25 lines • 721 B
/** * A custom React hook that detects whether the current device is a mobile device * based on the screen width. * * This hook uses a media query to check if the viewport width is less than the defined * mobile breakpoint (768px). It updates the state when the window size changes. * * @returns {boolean} Returns true if the viewport width is less than the mobile breakpoint, * false otherwise. * * @example * ```tsx * function MyComponent() { * const isMobile = useIsMobile(); * * return ( * <div> * {isMobile ? 'Mobile View' : 'Desktop View'} * </div> * ); * } * ``` */ export declare function useIsMobile(): boolean; //# sourceMappingURL=use-mobile.d.ts.map