fitter-js
v1.2.0
Published
Simple text fitting, supports shadow DOM
Downloads
10
Readme
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 });