Tutorial available in Alpine.js, Next.js, and Vue:
Alpine.js: https://cruip.com/how-to-build-a-modal-video-with-html-tailwind-css-and-alpine-js/
Next.js: https://cruip.com/how-to-build-a-modal-video-component-with-tailwind-css-and-next-js/
Vue: https://cruip.com/how-to-build-a-modal-video-component-with-tailwind-css-and-vue/
Disclaimer: I'm not the author of this post but I learned quite a bit by going through the three different series of this article :)