Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 1.33 KB

File metadata and controls

38 lines (29 loc) · 1.33 KB

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
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)
  }
})