JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 21264
  • Score
    100M100P100Q150243F
  • License MIT

Simple method for resposive fontSize based on screen-size of the device in React-Native

Package Exports

  • react-native-responsive-fontsize

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-responsive-fontsize) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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