1.7.0 • Published 4 years ago
react-viewport-size v1.7.0
React Viewport Size
Add a little widget in any of your screen corners to see the viewport size.
This widget helps a lot, when you are testing web responsive design, to know the current viewport size, and how the media queries works.
Demo
See this demo page, and try to resize it.
Installation
npm
npm install react-viewport-size
yarn
yarn add react-viewport-size
usage
import React from 'react';
import ReactDOM from 'react-dom';
import App from './app';
import ViewportSize from 'react-viewport-size';
ReactDOM.render(
<React.Fragment>
<App />
<ViewportSize />
</React.Fragment>,
document.getElementById('root')
);
Props
Prop | Type | Default Value | Options | Description |
---|---|---|---|---|
className | string | viewport-size-widget | custom | Define the classname for the widget |
corner | string | top-right | top/bottom-left/right | Define the position on the screen (only with the default className) |
enabledInProduction | boolean | false | true/false | Render the component in production environment |
1.7.0
4 years ago
1.6.2
4 years ago
1.6.1
4 years ago
1.6.0
4 years ago
1.5.4
4 years ago
1.5.3
4 years ago
1.5.2
4 years ago
1.5.1
4 years ago
1.5.0
4 years ago
1.4.15
4 years ago
1.4.14
4 years ago
1.4.13
4 years ago
1.4.12
4 years ago
1.4.11
4 years ago
1.4.10
4 years ago
1.4.9
4 years ago
1.4.8
4 years ago
1.4.7
4 years ago
1.4.6
4 years ago
1.4.5
4 years ago
1.4.4
4 years ago
1.4.3
4 years ago
1.4.2
4 years ago
1.4.1
4 years ago
1.4.0
4 years ago
1.3.0
4 years ago
1.2.0
5 years ago
1.1.0
5 years ago
1.0.0
5 years ago
0.1.2
5 years ago
0.1.1
5 years ago