ensemble.Modal JavaScript class, based on ensemble from loltgt
This modal dialog component supports JS and inline content.
It has built-in HTMLDialogElement.
It comes with options and hooks to customize.
Live demo on this page: https://loltgt.github.io/ensemble-modal/demo/
View source from demo
to discover options and examples.
Using npm:
npm install --save-dev loltgt/ensemble-modal
Simple usage example:
const modal = new ensemble.Modal(document.querySelector(".inline-content"));
document.querySelector("button").addEventListener("click", modal.open);