react-textfit is a npm package which fits text content to any element.
Imaging that a div tag is 100px and the text content has 1000 letters. react-textfit makes the font size very small (even 1px) in order to fit the text content into the div width.
https://www.npmjs.com/package/react-textfit