1.0.9 • Published 1 year ago

react-native-responsive-surender v1.0.9

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

react-native-responsive-surender

An npm package for responsive your react native app

Install this Package

npm i react-native-responsive-surender

It will automatically make Responsive fontSize, height, width according to device width

import Size from 'react-native-responsive-surender';

const App = ()= > {
  return (
    <View style={{fontSize: Size(16)}}>
      <Text>Hello World!</Text>
    </View>
  );
};

Get the Device Width and Height Using Below

import {screenWidth, screenHeight} from 'react-native-responsive-surender';

const App = ()= > {
  return (
    <View style={{height: screenHeight, width: screenWidth}}>
      <Text>Hello World!</Text>
    </View>
  );
};

Get the Multiple Sizes if any not getting fit

Using different size you need to use Size(lg, md, sm).

import Size from 'react-native-responsive-surender';

const App = ()= > {
  return (
    <View>
      <Text style={{fontSiz: size(40,30,20)}}>Hello World!</Text>
    </View>
  );
};
 * 1. lg is for screen that is between 600 to 767.
 * 2. md is for screen that is between 400 to 599.
 * 3. sm is for screen that is smaller than 399.

#use percentages for for all screen Size

import Size from 'react-native-responsive-surender';

const App = ()= > {
  return (
    <View style={{height: Size("10%")}}>
      <Text>Hello World!</Text>
    </View>
  );
};

#use percentages for specific screen Size

import Size from 'react-native-responsive-surender';

const App = ()= > {
  return (
    <View style={{height: Size("10%", "15%", "20%")}}>
      <Text>Hello World!</Text>
    </View>
  );
};
1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago