malte-wessel/react-textfit

Having different resize for the same text

Closed this issue · 2 comments

On the following picture is it possible to have a part of a text resize with another factor? (having the "ms" text smaller)
image
Many thanks

You can do this today! We manipulate the font size using the CSS font-size at the top level container. You need to add a wrapper element with font-size using percents:

<Textfit>
  1<span style={{ fontSize: '80%' }}>ms</span>
</Textfit>

marvellous!