Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gianu/react-fittext
React Plugin to fit text on the screen
https://github.com/gianu/react-fittext
Last synced: 4 months ago
JSON representation
React Plugin to fit text on the screen
- Host: GitHub
- URL: https://github.com/gianu/react-fittext
- Owner: gianu
- License: mit
- Created: 2014-12-17T12:40:58.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2021-08-26T08:48:07.000Z (over 3 years ago)
- Last Synced: 2024-06-22T18:47:58.830Z (6 months ago)
- Language: JavaScript
- Homepage: http://softwarepsychonaut.com/react-fittext
- Size: 496 KB
- Stars: 217
- Watchers: 5
- Forks: 51
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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
```javascript
// In your React componentvar ReactFitText = require('react-fittext');
...
Testing React Fittext
```
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)