rn-responsive-font

1.0.0 • Public • Published

rn-responsive-font

A magical & easy method for responsive fontSize based on screen width to support all size devices.

How to install

yarn add rn-responsive-font

npm install rn-responsive-font --save

How it looks on different devices

rn-responsive-font

Usage example

import React, {Component} from 'react';
import { Text, View } from 'react-native';

import resp from "rn-responsive-font";

class App extends Component {
  render() {
      return <View style={styles.container}>
          <Text style={styles.text}>
              My App fits all screen
          </Text>
      </View>
  }
}

const styles = {
    container: {
        flex: 1, 
        justifyContent: "center",
        alignItems: "center"
    },
    text: {
        // I want idle size to be 20
        fontSize: resp(20)
    }
}

It supports both the platforms Android & iOS

Package Sidebar

Install

npm i rn-responsive-font

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

6.21 kB

Total Files

5

Last publish

Collaborators

  • androconsis