1.0.0 • Published 7 years ago
react-text-resize v1.0.0
React Text Resize
Control the size of your paragraphs based on its length.
Shorter lines will start at the max
size, then decrease in size until the maximum number of characters (capAt
) is reached; at which point it will use the min
size and stop decreasing.
Installation
npm install react-text-resize
Usage
The component accepts DOM elements as children to count its number of characters:
<TextFit className="optional-classes" min="16" max="46" capAt="150">
<p>“Wise quotes are shorter”</p>
</TextFit>
1.0.0
7 years ago