1.1.5 • Published 7 years ago

react-native-fittedtext v1.1.5

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

react-native-fittedtext Build Status npm version

A React Native text component that sets its fontSize to fill a target height.

Installation

npm install react-native-fittedtext --save

Usage

<FittedText targetHeight={height}>
  I will expand to fill the specified height!
</FittedText>

Full example

import React, { Component } from 'react';
import { AppRegistry, Dimensions, Text, View } from 'react-native';
import FittedText from 'react-native-fittedtext';

export default FittedExample = () => {
  var {height, width} = Dimensions.get('window');
  return (
    <View style={{flex: 1}}>
      <FittedText targetHeight={height}>
        I will expand to fill the window!
      </FittedText>
    </View>
  );
}

AppRegistry.registerComponent('FittedExample', () => FittedExample);

Screenshot

iOS Screenshot

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago