Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

react-native-responsive-fontSize

> 前端框架
Open source

Responsive fontSize based on screen-size of the device in React-Native

740 stars0 likes1 views
WebsiteGitHub

About

Responsive fontSize based on screen-size of the device in React-Native

react-native-responsive-fontsize

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

How to install

bash
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

Methods

arguments Description
RFPercentage percent: number The font size is calculated as a percentage of the height(width in landscape mode) of the device.
RFValue value: number, standardScreenHeight?: number The 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

javascript
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

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptfontfontsizegitgithub

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架