0.5.1 • Published 4 years ago

react-native-responsive-fontsize v0.5.1

Weekly downloads
7,060
License
MIT
Repository
github
Last release
4 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-2589swapnil2510storytellingstorybook-somapay-mobile-example@codedreams/react-elements@devesharp/react@devesharp/react-webatlas-design-system-mobilestyled-functors@amir-hossein-karimi/toastify-react-native@atomic-space-component-library/buttons@cloud-varejo/cloud-varejo-ui@cognu-ui/react-native@didcky/jaijaggayelow-comman@ha_tecno/live-id-sdk@eventvm/evtmobilekit@lang0909/react-native-alpha-flat-list@kunalkumar007/videosdk-ui-kit@lgowrav/testapp@eohjsc/react-native-smart-city@platformbuilders/react-native-elements@platformbuilders/react-native-ui@priyankahash/expoapp@sawport/react-native-sdk@paichato/expo-template@somapay/storybook-somapay-mobile@revodigital/evt-mobile-kit@revodigital/eco-uinaushad-private-componentocrsdk-kennethreact-native-alpha-flat-listreact-native-alpha-scroll-flat-list-hapticreact-native-code-testreact-native-expo-custom-buttonsreact-native-expo-dropdownreact-native-common-text-inputreact-native-custom-stylereact-native-live-id-sdkreact-native-form-jsonreact-native-horizontal-listscorpiousscorpious_kogoreact-native-global-sizereact-native-gacrn_sj_componentsrn-picostylern-expo-network-indicatorreact-native-abmb-stylesrytsreact-native-artocks-uireact-native-oscomponentsreact-native-speed-meterreact-native-sj-componentsreact-native-step-by-step-processreact-native-voucher-in-store-componentreact-native-quarapay-walletreact-native-sb-ecommerceqwalletpruebapv3reat-native-list-viewreact-native-t8-componentsreact-native-toastify-plusinput-mask-native-base-rhfmaxlife-glide@uncover-ui/react-native@tisf/rn-providers@viktorvojtek/react-native-simple-components@vizibr/react-native-elements@zalastax/nolb-react-native-r@suprsend/rn-inboxalpha-scroll-flat-listatomic-space-component-librarycitizenship_app_newscomponent-library-wunder-testdefaultinput-samaybankerise-uidynamic-forms-testexpo-react-native-toastifyfindme-forms
0.5.1

4 years ago

0.5.0

5 years ago

0.4.3

5 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago