react-native-responsiveness
TypeScript icon, indicating that this package has built-in type declarations

0.1.7 • Public • Published

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:

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

Package Sidebar

Install

npm i react-native-responsiveness

Weekly Downloads

20

Version

0.1.7

License

MIT

Unpacked Size

5.73 kB

Total Files

5

Last publish

Collaborators

  • umeraftab