In React native, is the font size responsive on its own?
for example, if I give fontSize:10 to a Text component, will it automatically increase/decrease based on the size of the phone? If not, how to make it responsive?
Asked
Active
Viewed 90 times
0
Karan
- 77
- 1
- 5
-
Does this answer your question? [Responsive font size in CSS](https://stackoverflow.com/questions/15649244/responsive-font-size-in-css) – לבני מלכה Jan 04 '22 at 09:07
-
Units aren't used in react native as far as I know – Karan Jan 04 '22 at 09:17
-
don't know much about react native but try changing `10` to `"10px"` – Anuja Nimesh Jan 04 '22 at 09:50
-
cannot use pixels in react native or any other units – Karan Jan 04 '22 at 10:12
1 Answers
1
enter link description hereThe font size is automatically adjusted according to the size of the screen. Try applying this method.
yarn add react-native-responsive-fontsize
npm install react-native-responsive-fontsize --save
Alex Dean
- 197
- 5