Live Progress
Follow a deployment through to its final status.
Production deployment
Queued
HTML
<div class="mero-scope" data-mero-scope>
<section class="mero-card mero-live" aria-labelledby="deployment-title" tabindex="-1" data-mero-live="3000"
hx-get="/demo/catalog/live-progress" hx-trigger="mero:refresh"
hx-target="find [data-mero-live-status]" hx-swap="innerHTML" hx-include="find input">
<h2 class="mero-card-title" id="deployment-title">Production deployment</h2>
<div class="mero-live-status" data-mero-live-status role="status" aria-atomic="true">
<span class="mero-badge mero-badge-dot">Queued</span>
<input type="hidden" name="started" value="">
</div>
<p class="mero-form-status" role="status" data-mero-live-error></p>
<button type="button" class="mero-button mero-button-secondary" data-mero-live-retry hidden>Retry now</button>
</section>
</div>HTTP exchange
Use the preview to see the request and the HTML your server returns.Return an HTML fragment with the current status. Send Mero-Live: done with the final status to stop polling. A failed read keeps the last status and offers a retry. Polling pauses in background tabs and refreshes when the tab becomes visible. The hidden started field drives this demo. In your app, point hx-get at the operation and omit that field and hx-include.
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-live.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 ↓