https://github.com/tiaanduplessis/react-native-get-pixel-dimensions
Get the width and height of device in pixels
https://github.com/tiaanduplessis/react-native-get-pixel-dimensions
dimensions height pixels react-native width
Last synced: 10 months ago
JSON representation
Get the width and height of device in pixels
- Host: GitHub
- URL: https://github.com/tiaanduplessis/react-native-get-pixel-dimensions
- Owner: tiaanduplessis
- License: mit
- Created: 2017-09-23T13:51:15.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-06-02T22:57:49.000Z (about 7 years ago)
- Last Synced: 2024-08-09T12:27:38.467Z (almost 2 years ago)
- Topics: dimensions, height, pixels, react-native, width
- Language: JavaScript
- Size: 34.2 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
react-native-get-pixel-dimensions
Get the width and height of device in pixels
Table of Contents
Table of Contents
## Install
```sh
$ npm install react-native-get-pixel-dimensions
# OR
$ yarn add react-native-get-pixel-dimensions
```
## Usage
```js
import getPixelDimensions from 'react-native-get-pixel-dimensions'
getPixelDimensions()
// {width: 750, height: 1334} // On iPhone 6
```
## Contributing
Contributions are welcome!
1. Fork it.
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D
Or open up [a issue](https://github.com/tiaanduplessis/react-native-get-pixel-dimensions/issues).
## License
Licensed under the MIT License.