Accessible dialogs for the web
Create and animate modals with vanilla JavaScript and CSS. Open a dialog, then try stacking a second one on top.
import { createWebcimesModal } from 'webcimes-modal';
const first = createWebcimesModal({
titleHtml: 'Save changes?',
bodyHtml: '<button>Open second modal</button>',
});
first.modal.querySelector('button')
.addEventListener('click', () => {
createWebcimesModal({ titleHtml: 'Second modal' });
});