Ouibounce: A small JS library that allows a user to create modals with custom markup.
You have a few options to choose from:
- Download the minified script and include it on your page
- Use NPM:
npm install easy-modal
Example:
Modal("<h1>Modal Title</h1>");
Example with dom element:
Modal(document.getElementById("some-id"));
Ouibounce offers a few options, such as:
If you want to apply style to the modal root element you use modalClass param. Example:
Modal("<h1>Modal Title</h1>", {modalClass: "modal"});
Example:
ouibounce("<h1>Modal Title</h1>", {dialogClass: "dialog"});
Example:
ouibounce("<h1>Modal Title</h1>", {backdropClass: "glass"});