Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/manufosela/modal-layer
- Owner: manufosela
- Created: 2020-11-21T20:01:09.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-08-25T18:22:34.000Z (over 2 years ago)
- Last Synced: 2024-10-11T23:18:41.044Z (2 months ago)
- Language: JavaScript
- Size: 259 KB
- Stars: 0
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 = `
`;
modalLayer.openModal();
```