react-native-responsiveness
v0.1.7
Published
Make React Native views responsive for all devices with the use of 2 simple methods.
Downloads
57
Maintainers
Readme
React-native Responsive Screen
This is to Create Responsive Screens on both Android and Ios and if you wish to ask anything feel free to send Mail at [email protected]
Installation
npm i react-native-responsiveness
or
yarn add react-native-responsiveness
To Import:
import { w, h } from "react-native-responsiveness";
To Use:
const styles = StyleSheet.create({
MainContainer: {
width: w("90%"), // use here
height: h("40%"), // use here
},
title: {
color: "black",
fontSize: h("3%"), //Use for font
},
});
Important Note
For font (2.5%) is the Standard Size
Use 'h' for hight and 'w' for width as shown in code
Use percentage of total screen in between h and w in String Format
Use h for font size
Use w only for width