JSFiddle - React, Tailwind, and code Playground
HTML
<div id="dialog-modal" title="Basic modal dialog" style="display:none">
<p>
Adding the modal overlay screen makes the dialog look more
prominent because it dims out the page content.
</p>
<a id="close" href="">Close</a>
</div>
<a href="#" id="clickHere">Click here</a>
JavaScript
$( "#dialog-modal" ).dialog({
autoOpen: false,
height: 140,
modal: true
});
$("#clickHere").click(function(){
$( "#dialog-modal" ).dialog('open');
});
$("#close").click(function(){
$( "#dialog-modal" ).dialog('close');
});