react-native-device-size
v0.1.0
Published
classify mobile device size in react-native
Downloads
9
Readme
react-native-device-size
classify mobile device size in react-native.
Usage
import deviceSize from 'react-native-device-size';
console.log(deviceSize); // return one of xsmall, small, normal, large, xlarge
Device size category
iOS and android use different standard to classify, iOS use iphone versions, and android use official classification .
According to the documents:
- xlarge screens are at least 960dp x 720dp
- large screens are at least 640dp x 480dp
- normal screens are at least 470dp x 320dp
- small screens are at least 426dp x 320dp
xsmall
- iOS: iphone 4
- android: less than 426dp x 320dp
small
- iOS: iphone 5
- android: less than 470dp x 320dp
normal
- iOS: iphone 6
- android: less than 640dp x 480dp
large
- iOS: iphone 6 plus
- android: less than 960dp x 720dp
xlarge
- iOS: larger than iphone 6 plus
- android: larger than 960dp x 720dp
Device Metric
https://material.io/devices/
License
MIT