Socket
Socket
Sign inDemoInstall

react-fittext

Package Overview
Dependencies
21
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-fittext

A React plugin to fit the text in the screen


Version published
Weekly downloads
8.4K
increased by0.84%
Maintainers
2
Install size
238 kB
Created
Weekly downloads
 

Readme

Source

React Fit text

This component is a port of the famous fit text plugin for jQuery to use with React.

This component is 100% jQuery Free.

Homepage: http://softwarepsychonaut.com/react-fittext

Usage

Simply wrap your text component inside

// 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.

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.

If you want to improve the code, feel free to create a PR!

Thanks

Keywords

FAQs

Last updated on 09 Jun 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc