vanilla-modal-layer

1.4.3 • Public • Published

ModalLayer javascript class

To create modals layers easily. It uses vanilla javascript.

Install

$ npm install vanilla-modal-layer

Demo

Codepen Demo;

Local demo

$ npm run start

Example

import { ModalLayer } from '../ModalLayer.js';
    
const modalLayer = new ModalLayer(); 
modalLayer.styleContent = `
  main {
    display:flex;
    justify-content: center;
    align-items: center;
  }
`;
modalLayer.contentHTML = `
  <main>
    <div>
      <h1>Testing ModalLayer</h1>
      <p>To create modals layers easily. It uses vanilla javascript.</p>
      <a href="https://codepen.io/manufosela/pen/MWeMXrO">Codepen Demo</a>
    </div>
  </main>
`;
modalLayer.openModal();

Readme

Keywords

Package Sidebar

Install

npm i vanilla-modal-layer

Weekly Downloads

1

Version

1.4.3

License

Apache-2.0

Unpacked Size

16.6 kB

Total Files

7

Last publish

Collaborators

  • manufosela