Skip to content

roquef/Fitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

text fitting, supports shadow DOM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published