1.2.0 • Published 4 years ago

fitter-js v1.2.0

Weekly downloads
3
License
GPL-3.0
Repository
github
Last release
4 years ago

Fitter

Simple text fitting, supports shadow DOM

  • Example
  • Responsive Example

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

4 years ago

1.1.1

4 years ago

1.1.2

4 years ago

1.1.0

4 years ago

1.0.0

5 years ago