boundless-fitted-text
v1.1.0
Published
Fit given text inside a parent container, obeying implict and explicit constraints.
Downloads
4
Maintainers
Readme
THIS IS AN AUTOGENERATED FILE. EDIT INDEX.JS INSTEAD.
FittedText
Fit given text inside a parent container, obeying implict and explicit constraints.
The most common use case for this class is fitting single-line text of unknown/variable length into a button or heading with finite boundaries.
Props
Note: only top-level props are in the README, for the full list check out the website.
Required Props
There are no required props.
Optional Props
<tr>
<td>component</td>
<td><pre><code>string or function</code></pre></td>
<td><pre><code class="language-js">'span'</code></pre></td>
<td>any valid HTML tag name or a React component factory, anything that can be passed as the first argument to `React.createElement`</td>
</tr>
<tr>
<td>maxFontSize</td>
<td><pre><code>number</code></pre></td>
<td><pre><code class="language-js">Number.MAX_VALUE</code></pre></td>
<td>an upper bound (in pixels) for how large the text is allowed to grow</td>
</tr>