Novice, Practiced, Mastered

    modal-layout

    1.0.2 • Public • Published

    Modal Layout

    NPM version Build Status Dependency Status devDependency Status

    Modal your way

    Install

    Via NPM

    npm i modal-layout --save
    

    Via Bower

    bower install modal-layout --save
    

    Usage

    var m = new ModalLayout('Awesome stuff!');
     
    m.on('open', function(modalInstance) {
      console.log('modal is open', modalInstance);
    });
    m.open()

    Api

    ModalLayout(content [, opts])
    

    Parameters

    content

    HTMLElement or string.

    opts

    Options Default Description
    esc true close modal pressing esc
    beforeOpen null call a method before open modal
    prefix 'modalLayout' prefix used in your css
    escape false escape content html

    Methods

    Methods Description
    open show modal
    close hide modal
    destroy destroy modal
    isOpen check if modal is opened

    Events

    Events
    open
    close
    destroy

    License

    MIT © Thiago Lagden

    Install

    npm i modal-layout

    DownloadsWeekly Downloads

    3

    Version

    1.0.2

    License

    MIT

    Last publish

    Collaborators

    • lagden