react-websizers
v1.0.5
Published
real-time access to browser window width and screen height in React applications.
Downloads
2
Readme
react-websizers
react-websizers is a React library designed to provide developers with accurate measurements of the width and height of the user's browser window or screen. By integrating this library into a React application, developers can dynamically adjust their UI components or application layout based on the available screen real estate. This can be particularly useful for creating responsive web designs that adapt to different screen sizes and resolutions.
Installation
You can install react-websizers via npm:
npm install react-websizers
Usage
getBoundRects
This function basically returns all window data
import { getBoundRects } from 'react-websizers';
const data = getBoundRects();
console.log(data.width); // 1920
License
This package is MIT licensed.