JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width" />
    <link
          rel="stylesheet"
          href="https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/fancybox/fancybox.css"
          />
  </head>
  <body>
    <div>
      <div id="dialog-content" style="display:none;max-width:500px;">
        <h2>Hello, world!</h2>
        <p>
          <input type="text" value="" />
        </p>
        <p>
          Try hitting the tab key and notice how the focus stays within the dialog
          itself.
        </p>
        <p>
          To close dialog hit the esc button, click on the overlay or just click the
          close button.
        </p>
        <p>
          Element used to launch the modal would receive focus back after closing.
        </p>
      </div>
      <p>
        <button data-fancybox data-src="#dialog-content">Launch Dialog</button>
      </p>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/fancybox/fancybox.umd.js"></script>
    <script>
      Fancybox.bind('[data-fancybox]', {
        // Custom options for all galleries
      });    
    </script>
  </body>
</html>