react-native-responsiveness
Version:
Make React Native views responsive for all devices with the use of 2 simple methods.
47 lines (30 loc) • 877 B
Markdown
# 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 Umeraftab7747@gmail.com
# Installation
`npm i react-native-responsiveness`
or
`yarn add react-native-responsiveness`
---
## To Import:
```javascript
import { w, h } from "react-native-responsiveness";
```
## To Use:
```javascript
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