0.5.1 • Published 3 years ago

react-native-responsive-fontsize v0.5.1

Weekly downloads
7,060
License
MIT
Repository
github
Last release
3 years ago

react-native-responsive-fontsize

PRs Welcome Platform License Greenkeeper badge

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
lano-tech-store-mobilevideoplayer-iosreact-native-template-spaceship@infinitebrahmanuniverse/nolb-react-native-rshared-react-native-types@everything-registry/sub-chunk-2589input-mask-native-base-rhfexpo-react-native-toastifyfindme-formsqwalletreact-native-custom-stylereact-native-expo-custom-buttonsreact-native-expo-dropdownreact-native-global-sizereact-native-gacreact-native-form-jsonreact-native-alpha-flat-listreact-native-alpha-scroll-flat-list-hapticreact-native-code-testscorpiousscorpious_kogorytsreat-native-list-viewreact-native-sb-ecommercereact-native-quarapay-walletreact-native-live-id-sdkreact-native-oscomponentsreact-native-abmb-stylesreact-native-horizontal-listreact-native-artocks-uireact-native-speed-meterreact-native-step-by-step-processreact-native-toastify-plusreact-native-t8-componentsreact-native-voucher-in-store-componentrn-expo-network-indicatorrn-picostyleswapnil2510storytellingcomponent-library-wunder-teststorybook-somapay-mobile-examplestyled-functorscitizenship_app_news@kunalkumar007/videosdk-ui-kit@platformbuilders/react-native-elements@platformbuilders/react-native-ui@priyankahash/expoapp@eohjsc/react-native-smart-city@revodigital/eco-ui@revodigital/evt-mobile-kit@sawport/react-native-sdk@paichato/expo-template@lgowrav/testapp@lang0909/react-native-alpha-flat-list@ha_tecno/live-id-sdkdefaultinput-samay@eventvm/evtmobilekityelow-comman@vizibr/react-native-elements@suprsend/rn-inbox@viktorvojtek/react-native-simple-components@tisf/rn-providers@somapay/storybook-somapay-mobile@atomic-space-component-library/buttons@zalastax/nolb-react-native-r@codedreams/react-elements@cognu-ui/react-native@devesharp/reactalpha-scroll-flat-list@devesharp/react-web@didcky/jaijaggaatomic-space-component-library
0.5.1

3 years ago

0.5.0

3 years ago

0.4.3

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.0

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago