πŸ”  Responsive fontSize based on screen-size of the device in React-Native
Branch: master
Clone or download
Latest commit d707cf0 Jan 27, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Update config.yml Dec 7, 2018
images
.gitignore typings separated into a different file (#11) Jan 27, 2019
.npmignore
.prettierignore
.prettierrc set circleci config file Dec 7, 2018
LICENSE
README.md Update README.md (#8) Dec 7, 2018
index.d.ts
index.js
package.json BUMP 0.1.8 Jan 27, 2019

README.md

react-native-responsive-fontsize

PRs Welcome Platform License

This is simple method for responsive font size
Basically it depends on device height

How to install

yarn add react-native-responsive-fontsize
or
npm install react-native-responsive-fontsize --save

How it looks on different device sizes

iPhone SE iPhone X

Usage

import RF from "react-native-responsive-fontsize"

const styles = StyleSheet.create({
  welcome: {
    fontSize: RF(3.5),
    textAlign: "center",
    margin: 10
  },
  instructions: {
    textAlign: "center",
    color: "#333333",
    marginBottom: 5,
    fontSize: RF(2.5)
  }
})