# react-fittext

> A React plugin to fit the text in the screen

Latest version **1.0.0** (published 2017-06-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-fittext
pnpm add react-fittext
yarn add react-fittext
bun add react-fittext
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-06-09 |
| First published | 2014-12-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Sergio R. Gianazza |
| Maintainers | denis-sokolov, gianu |
| Keywords | react, fittext, responsive, react-component |

## Links

- npm: https://www.npmjs.com/package/react-fittext
- Homepage: http://softwarepsychonaut.com/react-fittext
- Issues: https://github.com/gianu/react-fittext/issues
- npm.io page: https://npm.io/package/react-fittext

## Dependencies (2)

- [prop-types](https://npm.io/package/prop-types.md) ^15.5.10
- [create-react-class](https://npm.io/package/create-react-class.md) ^15.5.3

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2017-06-09
- 0.0.7 — 2016-06-14
- 0.0.6 — 2016-06-14
- 0.1.1 — 2015-09-22
- 0.1.0 — 2015-09-22
- 0.0.5 — 2015-07-24
- 0.0.4 — 2015-01-19
- 0.0.3 — 2014-12-31
- 0.0.2 — 2014-12-29
- 0.0.1 — 2014-12-29

## README

# React Fit text

This component is a port of the famous [fit text](http://fittextjs.com/) plugin for jQuery to use with React.

This component is 100% jQuery Free.

Homepage: [http://softwarepsychonaut.com/react-fittext](http://softwarepsychonaut.com/react-fittext)

## Usage

Simply wrap your text component inside <ReactFitText>

```javascript
// In your React component

var ReactFitText = require('react-fittext');
...

<ReactFitText>
  <h2>Testing React Fittext</h2>
</ReactFitText>
```

and you're good to go!

If you want to see a live demo of this component, you can [check the homepage](http://softwarepsychonaut.com/react-fittext).

### Parameters
 There are few options you can send to the component to modify it default behaviour:

 * __compressor__: you can tweak this variable to increase / decrease the font-size. Default is 1.
 * __minFontSize__: the minimun font size (in px) this component should use.
 * __maxFontSize__: the maximum font size (in px) this component should use.

## Issues / PR

 If you found any issue with this component, please [report it](https://github.com/gianu/react-fittext/issues).

 If you want to improve the code, feel free to create a PR!
 
## Thanks
* [KyleAMathews](https://github.com/KyleAMathews)
* [revolunet](https://github.com/revolunet)
* [poteto](https://github.com/poteto)

---
_Source: https://npm.io/package/react-fittext · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
