Ninja Pumpkin Mutants

    This package has been deprecated

    Author message:

    https://github.com/springernature/frontend-toolkits/blob/master/DEPRECATED.md

    @springernature/global-expandable-box

    0.1.0 • Public • Published

    To use expandable box:

    import init from './expandable.js';
    
    var boxArray = Array.from(document.querySelectorAll('.box')); 
    init(boxArray);
    

    The init function can take additional arguments to specify a maximum height and button text for when the box is closed and open.

    function init(boxes, "90px", "close", "open")
    

    The default values are a height of "200px", closetext of "Show less" and opentext of "Show more".

    Expandable box offers two custom event listeners - open and close.

    box.addEventListener('close', function() {
    	console.log('closed!!');
    })
    

    Keywords

    none

    Install

    npm i @springernature/global-expandable-box

    DownloadsWeekly Downloads

    2

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    3.77 kB

    Total Files

    5

    Last publish

    Collaborators

    • roshandeorukhkar-sn
    • benjclark
    • sonniesedge
    • rlau
    • dotcode
    • joseluisbolos
    • hollsk
    • moddular
    • jpw
    • nickcall
    • howlingmad
    • sndigital
    • davidpauljunior
    • morgaan