Modal
Open a centered, named dialog with native focus containment.
HTML
<div class="rl-scope" data-rl-scope>
<button class="rl-button rl-button-primary" type="button" data-rl-open="demo-modal">Workspace details</button>
<dialog class="rl-dialog" id="demo-modal" aria-labelledby="demo-modal-title" aria-describedby="demo-modal-description">
<div class="rl-dialog-body">
<h2 class="rl-dialog-title" id="demo-modal-title">Workspace details</h2>
<p class="rl-description" id="demo-modal-description">Only workspace managers can change access.</p>
<div class="rl-dialog-footer">
<button class="rl-button rl-button-secondary" type="button" data-rl-close autofocus>Done</button>
</div>
</div>
</dialog>
</div>Use in your app
Copy these tags into your page head once. Serve the files at the paths shown, then add the example’s template to your page.
Page assets
<link rel="stylesheet" href="/mero.css">
<script defer src="/mero.js"></script>