ํ๋ก์ ํธ
GitHub์์ ๋ณด๊ธฐ 
heyman333/react-native-responsive-fontSize
์๊ฐ
๐ React Native์์ ๊ธฐ๊ธฐ ํ๋ฉด ํฌ๊ธฐ์ ๋ฐ๋ฅธ ๋ฐ์ํ fontSize
์น ๋ฐ ์ฑ ๊ฐ๋ฐ์ธก์ ๋ ์คํ ์ฆ๊ฐ
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- -1
- in 1 month
- -1
์๋ก ๊ฒน์น๋ ๊ธฐ๊ฐ์ ์์ฆ๊ฐ๋์ด๋ฉฐ ์ผ๋ณ ํฉ๊ณ๊ฐ ์๋๋๋ค. ์ธก์ ๊ฐ์ด ์์ผ๋ฉด ๋น์ ๋ก๋๋ค. ์คํ๋ ๊ด์ฌ๋๋ฅผ ๋ํ๋ด๋ฉฐ ํ์ง์ ๋ณด์ฅํ์ง ์์ต๋๋ค.
README.md
Original
react-native-responsive-fontsize
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 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'sstandardScreenHeight- default standardScreenHeight is
680 - In landscape mode, please pass the
screen width
- default standardScreenHeight is
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
Load map (I'm waiting for your help)
- support landscape mode
- make
test code
๊ด๋ จ ํ๋ก์ ํธ ์ดํด๋ณด๊ธฐ
๋ถ๋ฌ์ค๋ ์คโฆ

