Skip to content

idurar/vanilla-js-modal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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>