fitter-js

1.2.0 • Public • Published

Fitter

Simple text fitting, supports shadow DOM

Install:

npm i fitter-js

Basic usage:

new Fitter({
    min: 12, // px
    max: 32, // px
    element: '.js-fitter' // selector string or node
});

With shadow DOM:

let fitter = new Fitter({
    shadowRoot: yourShadowRoot
});

Update:

fitter.fit();

Set:

fitter.set({ min: 10 });

Readme

Keywords

Package Sidebar

Install

npm i fitter-js

Weekly Downloads

1

Version

1.2.0

License

GPL-3.0

Unpacked Size

41.2 kB

Total Files

5

Last publish

Collaborators

  • froque