fit-html-text
v0.3.0
Published
Fit text into its surrounding container.
Downloads
7
Readme
fit-html-text
Fit text into its surrounding container.
Usage
import { fitText } from "fit-html-text";
const element = document.getElementById("myElement");
fitText(element, {
fontMinSize: 8,
fontMaxSize: 72,
containerMaxWidth: 300,
containerMaxHeight: 300,
multipleLines: false,
});