vanilla-js-modal

Lightweight vanilla js modal component (just 2kb) , pure javascript Modal

MIT License

Stars
13

Lightweight vanilla js modal component (just 2kb)

pure javascript Modal , This is just 2kb Lightweight vanilla js modal component with zero dependencies , with option esc close , outside click close , custom height , widht

check demo here : https://idurar.github.io/vanilla-js-modal/


### javascript code to open Modal 

modal.open('idContent'); // to open Modal with wanted html content

// modal.close(); // to close Modal

### HTML code to insert in Modal 

<div id="idContent" style="display:none">
 <!--your Modal html content here -->
</div>