Stone Vase
- SKU
- RL-4001
- Category
- Objects
- Status
- Active
Add filters from a menu, see them as chips and remove them one at a time. The URL keeps the state.
<div class="mero-scope" data-mero-scope>
<section class="mero-records" data-mero-records data-mero-restore-focus hx-target="this" hx-select="[data-mero-records]" hx-swap="outerHTML show:none" hx-sync="this:replace">
<div class="mero-filter-bar" hx-boost="true">
<button class="mero-button mero-button-outline mero-button-sm" type="button" id="records-filter-add" popovertarget="records-filter-menu" aria-haspopup="menu" aria-expanded="false" aria-label="Add filter" aria-describedby="records-count" data-mero-focus-fallback><span aria-hidden="true">+</span> Filter</button>
<div class="mero-popover mero-menu" id="records-filter-menu" popover role="menu" aria-label="Add filter">
<a class="mero-menu-item" role="menuitem" href="?status=Active">Status is Active</a>
<a class="mero-menu-item" role="menuitem" href="?status=Draft">Status is Draft</a>
<a class="mero-menu-item" role="menuitem" href="?status=Archived">Status is Archived</a>
<a class="mero-menu-item" role="menuitem" href="?category=Furniture">Category is Furniture</a>
<a class="mero-menu-item" role="menuitem" href="?category=Lighting">Category is Lighting</a>
<a class="mero-menu-item" role="menuitem" href="?category=Objects">Category is Objects</a>
<a class="mero-menu-item" role="menuitem" href="?category=Textiles">Category is Textiles</a>
</div>
</div>
<div class="mero-table-wrap">
<table class="mero-table mero-table-compact">
<caption id="records-count">Studio products · 8 of 8</caption>
<thead hx-boost="true"><tr>
<th scope="col" aria-sort="ascending"><a id="records-sort-name" href="?sort=-name">Product <span aria-hidden="true">↑</span></a></th>
<th scope="col"><a id="records-sort-category" href="?sort=category">Category</a></th>
<th scope="col"><a id="records-sort-status" href="?sort=status">Status</a></th>
<th scope="col">Actions</th>
</tr></thead>
<tbody>
<tr>
<th scope="row"><a class="mero-row-link" href="?sort=name&open=1">Arc Task Lamp</a></th>
<td>Lighting</td>
<td><span class="mero-badge mero-badge-success">Active</span></td>
<td>
<button class="mero-button mero-button-ghost mero-button-sm" id="records-1-actions" type="button" popovertarget="records-1-menu" aria-haspopup="menu" aria-expanded="false" aria-label="Actions for Arc Task Lamp">Actions</button>
<div class="mero-popover mero-menu" id="records-1-menu" popover role="menu" aria-label="Arc Task Lamp actions">
<a class="mero-menu-item" role="menuitem" href="?sort=name&open=1">Open details</a>
<a class="mero-menu-item" role="menuitem" href="/components/data-grid">Edit in inventory</a>
</div>
</td>
</tr>
<tr>
<th scope="row"><a class="mero-row-link" href="?sort=name&open=7">Ash Lounge Chair</a></th>
<td>Furniture</td>
<td><span class="mero-badge">Archived</span></td>
<td>
<button class="mero-button mero-button-ghost mero-button-sm" id="records-7-actions" type="button" popovertarget="records-7-menu" aria-haspopup="menu" aria-expanded="false" aria-label="Actions for Ash Lounge Chair">Actions</button>
<div class="mero-popover mero-menu" id="records-7-menu" popover role="menu" aria-label="Ash Lounge Chair actions">
<a class="mero-menu-item" role="menuitem" href="?sort=name&open=7">Open details</a>
<a class="mero-menu-item" role="menuitem" href="/components/data-grid">Edit in inventory</a>
</div>
</td>
</tr>
<tr>
<th scope="row"><a class="mero-row-link" href="?sort=name&open=8">Brass Candle Holder</a></th>
<td>Objects</td>
<td><span class="mero-badge mero-badge-success">Active</span></td>
<td>
<button class="mero-button mero-button-ghost mero-button-sm" id="records-8-actions" type="button" popovertarget="records-8-menu" aria-haspopup="menu" aria-expanded="false" aria-label="Actions for Brass Candle Holder">Actions</button>
<div class="mero-popover mero-menu" id="records-8-menu" popover role="menu" aria-label="Brass Candle Holder actions">
<a class="mero-menu-item" role="menuitem" href="?sort=name&open=8">Open details</a>
<a class="mero-menu-item" role="menuitem" href="/components/data-grid">Edit in inventory</a>
</div>
</td>
</tr>
<tr>
<th scope="row"><a class="mero-row-link" href="?sort=name&open=2">Halo Pendant</a></th>
<td>Lighting</td>
<td><span class="mero-badge mero-badge-warning">Draft</span></td>
<td>
<button class="mero-button mero-button-ghost mero-button-sm" id="records-2-actions" type="button" popovertarget="records-2-menu" aria-haspopup="menu" aria-expanded="false" aria-label="Actions for Halo Pendant">Actions</button>
<div class="mero-popover mero-menu" id="records-2-menu" popover role="menu" aria-label="Halo Pendant actions">
<a class="mero-menu-item" role="menuitem" href="?sort=name&open=2">Open details</a>
<a class="mero-menu-item" role="menuitem" href="/components/data-grid">Edit in inventory</a>
</div>
</td>
</tr>
<tr>
<th scope="row"><a class="mero-row-link" href="?sort=name&open=6">Linen Cushion</a></th>
<td>Textiles</td>
<td><span class="mero-badge mero-badge-warning">Draft</span></td>
<td>
<button class="mero-button mero-button-ghost mero-button-sm" id="records-6-actions" type="button" popovertarget="records-6-menu" aria-haspopup="menu" aria-expanded="false" aria-label="Actions for Linen Cushion">Actions</button>
<div class="mero-popover mero-menu" id="records-6-menu" popover role="menu" aria-label="Linen Cushion actions">
<a class="mero-menu-item" role="menuitem" href="?sort=name&open=6">Open details</a>
<a class="mero-menu-item" role="menuitem" href="/components/data-grid">Edit in inventory</a>
</div>
</td>
</tr>
<tr>
<th scope="row"><a class="mero-row-link" href="?sort=name&open=3">Oak Side Table</a></th>
<td>Furniture</td>
<td><span class="mero-badge mero-badge-success">Active</span></td>
<td>
<button class="mero-button mero-button-ghost mero-button-sm" id="records-3-actions" type="button" popovertarget="records-3-menu" aria-haspopup="menu" aria-expanded="false" aria-label="Actions for Oak Side Table">Actions</button>
<div class="mero-popover mero-menu" id="records-3-menu" popover role="menu" aria-label="Oak Side Table actions">
<a class="mero-menu-item" role="menuitem" href="?sort=name&open=3">Open details</a>
<a class="mero-menu-item" role="menuitem" href="/components/data-grid">Edit in inventory</a>
</div>
</td>
</tr>
<tr>
<th scope="row"><a class="mero-row-link" href="?sort=name&open=5">Stone Vase</a></th>
<td>Objects</td>
<td><span class="mero-badge mero-badge-success">Active</span></td>
<td>
<button class="mero-button mero-button-ghost mero-button-sm" id="records-5-actions" type="button" popovertarget="records-5-menu" aria-haspopup="menu" aria-expanded="false" aria-label="Actions for Stone Vase">Actions</button>
<div class="mero-popover mero-menu" id="records-5-menu" popover role="menu" aria-label="Stone Vase actions">
<a class="mero-menu-item" role="menuitem" href="?sort=name&open=5">Open details</a>
<a class="mero-menu-item" role="menuitem" href="/components/data-grid">Edit in inventory</a>
</div>
</td>
</tr>
<tr>
<th scope="row"><a class="mero-row-link" href="?sort=name&open=4">Woven Throw</a></th>
<td>Textiles</td>
<td><span class="mero-badge">Archived</span></td>
<td>
<button class="mero-button mero-button-ghost mero-button-sm" id="records-4-actions" type="button" popovertarget="records-4-menu" aria-haspopup="menu" aria-expanded="false" aria-label="Actions for Woven Throw">Actions</button>
<div class="mero-popover mero-menu" id="records-4-menu" popover role="menu" aria-label="Woven Throw actions">
<a class="mero-menu-item" role="menuitem" href="?sort=name&open=4">Open details</a>
<a class="mero-menu-item" role="menuitem" href="/components/data-grid">Edit in inventory</a>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>Choose + Filter to add one. Each chip and Clear all are ordinary links to the URL without that filter. The server reads status and category from the query string, so the view survives reload, sharing and Back. The menu uses the Menu Button keyboard pattern.
Copy these tags into your page head once. Serve the files at the paths shown, then add the example’s template to your page.
<link rel="stylesheet" href="/mero.css">
<script defer src="/mero.js"></script>