In 2023, to show modal dialog, you do not need any fancy framework or library, nor do you need to install an ugly NPM package! Everything is already in the HTML5 standard and well-supported by browsers. Moreover, you can make a beautifully animated dialog with only a single line of JavaScript code: HTMLDialogElement.showModal()
Also, include a very simple script to trap the focus.
For newer browsers' implementation, no focus trap is needed.
2023 MIT