fit-html-text
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

fit-html-text

CI

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,
});

Usage for Browsers

Source

Demo Page

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i fit-html-text

Weekly Downloads

0

Version

0.3.0

License

MIT

Unpacked Size

9.56 kB

Total Files

5

Last publish

Collaborators

  • magiclen