Skip to content

Typed Confirmation

Require an exact phrase before submitting a destructive action.

View template

Delete environment?

Confirm deletion of the Acme production environment. This demo simulates the request.

acme/production/delete

Type the phrase exactly to enable confirmation.

Typed confirmation is a UX guard only. The server must re-check the phrase and permissions before acting. This demo also requires a reason of at least 8 characters on the server. To make the reason optional, remove required from that field and update the server validation.

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="/vendor/htmx.min.js"></script>
<script defer src="/mero.js"></script>
<script defer src="/mero-forms.js"></script>

Point the HTMX attributes at your own HTML endpoints. Use the live preview’s HTTP exchange to inspect the request and response.

Download library and examples ↓