0.3.0 • Published 2 months ago
fit-html-text v0.3.0
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,
});