Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-responsive-fontsize

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-responsive-fontsize

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

  • 0.5.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
40K
decreased by-3.44%
Maintainers
1
Weekly downloads
 
Created
Source
main image

react-native-responsive-fontsize

PRs Welcome Platform License Greenkeeper badge npm version

Use this library if you have a small problem with the font size 🎉


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 SEiPhone X
Methods
argumentsDescription
RFPercentagepercent: numberThe font size is calculated as a percentage of the height(width in landscape mode) of the device.
RFValuevalue: number, standardScreenHeight?: numberThe font size is calculated based on standardScreenHeight and passed value
  • when using RFValue's standardScreenHeight
    • default standardScreenHeight is 680
    • In landscape mode, please pass the screen width
Usage
import { RFPercentage, RFValue } from "react-native-responsive-fontsize";

const styles = StyleSheet.create({
  welcome: {
    fontSize: RFValue(24, 580) // second argument is standardScreenHeight(optional),
    textAlign: "center",
    margin: 10,
  },
  instructions: {
    textAlign: "center",
    color: "#333333",
    marginBottom: 5,
    fontSize: RFPercentage(5),
  },
});
Changelog

releases

Load map (I'm waiting for your help)
  • support landscape mode
  • make test code

Keywords

FAQs

Package last updated on 17 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc