Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/manufosela/modal-layer

Javascript Class to create Modals
https://github.com/manufosela/modal-layer

Last synced: about 1 month ago
JSON representation

Javascript Class to create Modals

Awesome Lists containing this project

README

        

# ModalLayer javascript class

To create modals layers easily. It uses vanilla javascript.

# Install
```
$ npm install vanilla-modal-layer
```

# Demo
[Codepen Demo](https://codepen.io/manufosela/pen/MWeMXrO);

# Local demo
```
$ npm run start
```

# Example

```javascript
import { ModalLayer } from '../ModalLayer.js';

const modalLayer = new ModalLayer();
modalLayer.styleContent = `
main {
display:flex;
justify-content: center;
align-items: center;
}
`;
modalLayer.contentHTML = `


Testing ModalLayer


To create modals layers easily. It uses vanilla javascript.


Codepen Demo


`;
modalLayer.openModal();
```