Alert Dialog
Ask for confirmation on a decision that calls for attention.
HTML
<div class="rl-scope" data-rl-scope>
<button class="rl-button rl-button-danger" type="button" data-rl-open="demo-alert-dialog">Archive project</button>
<dialog class="rl-dialog" id="demo-alert-dialog" role="alertdialog" aria-labelledby="demo-alert-dialog-title" aria-describedby="demo-alert-dialog-description">
<div class="rl-dialog-body">
<h2 class="rl-dialog-title" id="demo-alert-dialog-title">Archive project?</h2>
<p class="rl-description" id="demo-alert-dialog-description">This removes the project from active views.</p>
<div class="rl-dialog-footer">
<button class="rl-button rl-button-secondary" type="button" data-rl-close autofocus>Cancel</button>
<button class="rl-button rl-button-danger" type="button" data-rl-close>Archive</button>
</div>
</div>
</dialog>
</div>Focus starts on Cancel. Connect the confirmation to a form action in your application.
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>