Nukem's Possible Manifestation

    scrollfit

    0.0.4 • Public • Published

    scrollfit.js

    Tiny vanilla js module that fits text inside an HTML Element according to its scrollWidth/scrollHeight compared to its clientWidth/clientHeight.

    Installation

    npm install scrollfit --save
    

    Usage

    Scrollfit = require('scrollfit')
    
    new Scrollfit(document.querySelector('.scrollfit'))
    
    // or use integrated hook lookup:
    <div data-hook="scrollfit"> Some text that shoud be fitted</div>
    

    Contributing

    Yes, please. See github issues to get started. Needs more documentation and stuff. (As always)

    Thanks

    Highly inspired by the following awesome projects:

    An opensource module brought to you with love from optune.me

    Install

    npm i scrollfit

    DownloadsWeekly Downloads

    1

    Version

    0.0.4

    License

    MIT

    Last publish

    Collaborators

    • schmidsi