Inventory
Products, stock and publication status.
- Products
- 61 in draft
- Active
- 467% of catalog
- Categories
- 42 in Furniture
Server-rendered workspace HTML
<div id="studio-workspace" class="rl-app studio-workspace" hx-history="false" data-studio-view="inventory">
<aside class="rl-app-nav studio-nav">
<a class="studio-identity" href="/layouts/dashboard" hx-get="/layouts/dashboard" hx-target="#studio-workspace" hx-swap="outerHTML show:none" hx-push-url="true" hx-sync="#studio-workspace:replace" aria-label="Studio workspace overview">
<span class="studio-identity-mark"><svg aria-hidden="true" focusable="false" viewBox="0 0 24 24" height="18" width="18" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round"><path d="m3 15.5 8.7-10L21 8l-8.8 10.3L3 15.5Zm5.1-5.9 9.3 2.6m-8.4 4.9 8.8-10.2"/></svg></span><span>Studio<small>Team workspace</small></span>
</a>
<nav aria-label="Workspace"><div class="studio-nav-group"><span class="studio-group-name">Workspace</span>
<a href="/layouts/dashboard" hx-get="/layouts/dashboard" hx-target="#studio-workspace" hx-swap="outerHTML show:none" hx-push-url="true" hx-sync="#studio-workspace:replace" >
<svg aria-hidden="true" focusable="false" viewBox="0 0 24 24" height="18" width="18" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7" rx="1.6"/><rect x="14" y="3" width="7" height="7" rx="1.6"/><rect x="3" y="14" width="7" height="7" rx="1.6"/><rect x="14" y="14" width="7" height="7" rx="1.6"/></svg><span>Overview</span>
</a><a href="/layouts/dashboard?view=companies" hx-get="/layouts/dashboard?view=companies" hx-target="#studio-workspace" hx-swap="outerHTML show:none" hx-push-url="true" hx-sync="#studio-workspace:replace" >
<svg aria-hidden="true" focusable="false" viewBox="0 0 24 24" height="18" width="18" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round"><path d="M3 21h18M5 21V5l9-2v18m0-13h5v13M8 8h2M8 12h2M8 16h2"/></svg><span>Companies</span><small aria-hidden="true">6</small>
</a><a href="/layouts/dashboard?view=inventory" hx-get="/layouts/dashboard?view=inventory" hx-target="#studio-workspace" hx-swap="outerHTML show:none" hx-push-url="true" hx-sync="#studio-workspace:replace" aria-current="page">
<svg aria-hidden="true" focusable="false" viewBox="0 0 24 24" height="18" width="18" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round"><path d="m12 2.8 8.5 4.8v8.8L12 21l-8.5-4.6V7.6L12 2.8Zm0 9 8.5-4.2M12 11.8 3.5 7.6M12 12v9M8 5l8.2 4.8"/></svg><span>Inventory</span>
</a><a href="/layouts/dashboard?view=settings" hx-get="/layouts/dashboard?view=settings" hx-target="#studio-workspace" hx-swap="outerHTML show:none" hx-push-url="true" hx-sync="#studio-workspace:replace" >
<svg aria-hidden="true" focusable="false" viewBox="0 0 24 24" height="18" width="18" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round"><path d="M3 7h9m4 0h5M3 17h3m4 0h11"/><circle cx="14" cy="7" r="2"/><circle cx="8" cy="17" r="2"/></svg><span>Settings</span>
</a></div><div class="studio-nav-group"><span class="studio-group-name">Planning</span>
<a href="/layouts/dashboard?view=board" hx-get="/layouts/dashboard?view=board" hx-target="#studio-workspace" hx-swap="outerHTML show:none" hx-push-url="true" hx-sync="#studio-workspace:replace" >
<svg aria-hidden="true" focusable="false" viewBox="0 0 24 24" height="18" width="18" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="16" rx="2.4"/><path d="M8 8v7m4-7v4m4-4v6"/></svg><span>Task board</span><small aria-hidden="true">9</small>
</a><a href="/layouts/dashboard?view=calendar" hx-get="/layouts/dashboard?view=calendar" hx-target="#studio-workspace" hx-swap="outerHTML show:none" hx-push-url="true" hx-sync="#studio-workspace:replace" >
<svg aria-hidden="true" focusable="false" viewBox="0 0 24 24" height="18" width="18" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="5" width="18" height="16" rx="2.5"/><path d="M7.5 3v4m9-4v4M3 10h18m-13 4h2m3 0h2"/></svg><span>Bookings</span>
</a></div>
</nav>
</aside>
<section class="rl-app-main studio-main" aria-label="Workspace content"><header class="rl-page-head"><div><h1>Inventory</h1><p>Products, stock and publication status.</p></div></header>
<dl id="dashboard-stats" class="rl-stat-grid">
<div class="rl-stat"><dt>Products</dt><dd>6<small>1 in draft</small></dd></div>
<div class="rl-stat"><dt>Active</dt><dd>4<small><span class="rl-stat-meter" aria-hidden="true" style="--rl-stat-value:67%"></span>67% of catalog</small></dd></div>
<div class="rl-stat"><dt>Categories</dt><dd>4<small>2 in Furniture</small></dd></div>
</dl><div class="lab lab-expanded" data-lab data-inventory-revision="0">
<header class="lab-header"><div class="lab-breadcrumb"><span class="lab-workspace" aria-hidden="true">S</span><span>Studio</span><span class="lab-slash">/</span><span>Inventory</span></div><span class="lab-live"><i></i> Live demo</span></header>
<div class="lab-body">
<div class="lab-heading"><div><h2>Products</h2><p>Manage your product catalog.</p></div>
<button type="button" id="add-product" class="rl-button lab-add" aria-haspopup="dialog" hx-get="/demo/products/new" hx-target="#lab-overlay" hx-sync="#lab-overlay:replace"><span class="lab-icon lab-icon-plus" aria-hidden="true"></span> <span>Add product</span></button>
</div>
<form id="lab-filters" class="lab-toolbar" role="search" hx-get="/demo/products" hx-target="#product-results-frame" hx-swap="innerHTML" hx-sync="this:replace"
hx-trigger="submit, input changed delay:200ms from:find [type=search], change">
<label class="lab-search"><span class="lab-icon lab-icon-search" aria-hidden="true"></span> <span class="lab-sr-only">Search products</span><input id="lab-search" type="search" name="q" value="" placeholder="Search products…" autocomplete="off"></label>
<input type="hidden" name="dashboard" value="1">
<label class="lab-filter"><span class="lab-sr-only">Filter by category</span><select class="rl-select" name="filterCategory"><option value="">All categories</option><option>Furniture</option><option>Lighting</option><option>Objects</option><option>Textiles</option></select></label>
<label class="lab-filter lab-order"><span class="lab-sr-only">Sort products</span><select class="rl-select" name="order"><option value="">Default order</option><option value="name">Sort by name</option></select></label>
</form>
<p class="lab-request-error" data-lab-request-error role="alert" hidden></p>
<div id="product-results-frame"><div id="product-results">
<div class="lab-table-wrap">
<table class="rl-table lab-table">
<thead><tr><th scope="col">Product</th><th scope="col">Status</th><th scope="col">Category</th><th scope="col"><span class="lab-sr-only">Actions</span></th></tr></thead>
<tbody>
<tr id="product-1">
<th scope="row"><div class="lab-product">
<span class="lab-thumbnail lab-thumbnail-lilac" aria-hidden="true"><span></span></span>
<span class="lab-product-name"><strong>Arc Lounge Chair</strong><small>RL-1042</small></span>
</div></th>
<td><span class="lab-status lab-status-live">Active</span></td>
<td class="lab-category">Furniture</td>
<td class="lab-row-action"><button type="button" id="edit-product-1" class="rl-button lab-edit" aria-label="Edit Arc Lounge Chair" aria-haspopup="dialog"
hx-get="/demo/products/1/edit" hx-target="#lab-overlay" hx-sync="#lab-overlay:replace"><span class="lab-icon lab-icon-edit" aria-hidden="true"></span></button></td>
</tr>
<tr id="product-2">
<th scope="row"><div class="lab-product">
<span class="lab-thumbnail lab-thumbnail-peach" aria-hidden="true"><span></span></span>
<span class="lab-product-name"><strong>Halo Pendant</strong><small>RL-1078</small></span>
</div></th>
<td><span class="lab-status lab-status-draft">Draft</span></td>
<td class="lab-category">Lighting</td>
<td class="lab-row-action"><button type="button" id="edit-product-2" class="rl-button lab-edit" aria-label="Edit Halo Pendant" aria-haspopup="dialog"
hx-get="/demo/products/2/edit" hx-target="#lab-overlay" hx-sync="#lab-overlay:replace"><span class="lab-icon lab-icon-edit" aria-hidden="true"></span></button></td>
</tr>
<tr id="product-3">
<th scope="row"><div class="lab-product">
<span class="lab-thumbnail lab-thumbnail-mint" aria-hidden="true"><span></span></span>
<span class="lab-product-name"><strong>Fold Side Table</strong><small>RL-1116</small></span>
</div></th>
<td><span class="lab-status lab-status-live">Active</span></td>
<td class="lab-category">Furniture</td>
<td class="lab-row-action"><button type="button" id="edit-product-3" class="rl-button lab-edit" aria-label="Edit Fold Side Table" aria-haspopup="dialog"
hx-get="/demo/products/3/edit" hx-target="#lab-overlay" hx-sync="#lab-overlay:replace"><span class="lab-icon lab-icon-edit" aria-hidden="true"></span></button></td>
</tr>
<tr id="product-4">
<th scope="row"><div class="lab-product">
<span class="lab-thumbnail lab-thumbnail-sky" aria-hidden="true"><span></span></span>
<span class="lab-product-name"><strong>Forma Vase</strong><small>RL-1140</small></span>
</div></th>
<td><span class="lab-status lab-status-live">Active</span></td>
<td class="lab-category">Objects</td>
<td class="lab-row-action"><button type="button" id="edit-product-4" class="rl-button lab-edit" aria-label="Edit Forma Vase" aria-haspopup="dialog"
hx-get="/demo/products/4/edit" hx-target="#lab-overlay" hx-sync="#lab-overlay:replace"><span class="lab-icon lab-icon-edit" aria-hidden="true"></span></button></td>
</tr>
<tr id="product-5">
<th scope="row"><div class="lab-product">
<span class="lab-thumbnail lab-thumbnail-rose" aria-hidden="true"><span></span></span>
<span class="lab-product-name"><strong>Dune Throw</strong><small>RL-1151</small></span>
</div></th>
<td><span class="lab-status lab-status-archived">Archived</span></td>
<td class="lab-category">Textiles</td>
<td class="lab-row-action"><button type="button" id="edit-product-5" class="rl-button lab-edit" aria-label="Edit Dune Throw" aria-haspopup="dialog"
hx-get="/demo/products/5/edit" hx-target="#lab-overlay" hx-sync="#lab-overlay:replace"><span class="lab-icon lab-icon-edit" aria-hidden="true"></span></button></td>
</tr>
<tr id="product-6">
<th scope="row"><div class="lab-product">
<span class="lab-thumbnail lab-thumbnail-peach" aria-hidden="true"><span></span></span>
<span class="lab-product-name"><strong>Arc Task Lamp</strong><small>SL-204 · Soft ivory</small></span>
</div></th>
<td><span class="lab-status lab-status-live">Active</span></td>
<td class="lab-category">Lighting</td>
<td class="lab-row-action"><button type="button" id="edit-product-6" class="rl-button lab-edit" aria-label="Edit Arc Task Lamp" aria-haspopup="dialog"
hx-get="/demo/products/6/edit" hx-target="#lab-overlay" hx-sync="#lab-overlay:replace"><span class="lab-icon lab-icon-edit" aria-hidden="true"></span></button></td>
</tr></tbody>
</table>
</div>
<div class="lab-footer"><span role="status">6 products</span><span><i></i> Server-rendered HTML</span></div>
</div></div>
</div>
<div id="lab-overlay"><dialog id="product-dialog" class="rl-dialog rl-drawer lab-dialog" data-rl-autoopen aria-labelledby="product-dialog-title">
<div class="rl-dialog-body lab-dialog-body">
<header class="lab-dialog-head">
<div><h2 id="product-dialog-title">Edit product</h2><p>Update the product details.</p></div>
<button type="button" class="rl-button lab-dialog-close" data-rl-close aria-label="Close">×</button>
</header>
<form class="lab-form" data-rl-form data-rl-return-focus="#edit-product-6" data-rl-fallback-focus="#add-product"
hx-post="/demo/products/6" hx-target="this" hx-swap="outerHTML" hx-sync="this:drop" hx-include="#lab-filters">
<input type="hidden" name="productVersion" value="V9ZcRUtpe7xUOFBFu4QRYUosXTWwhx7eIOx0h9R1ySk">
<label class="lab-field" for="product-name"><span>Product name</span>
<input class="rl-input" id="product-name" name="name" value="Arc Task Lamp" maxlength="80" required autofocus>
</label>
<label class="lab-field" for="product-sku"><span>SKU</span>
<input class="rl-input" id="product-sku" name="sku" value="SL-204" maxlength="24" required>
</label>
<label class="lab-field"><span>Finish</span><select class="rl-select" name="finish"><option value="ivory" selected>Soft ivory</option><option value="sand">Warm sand</option><option value="graphite">Graphite</option></select></label>
<label class="lab-field"><span>Category</span><select class="rl-select" name="category"><option>Furniture</option><option selected>Lighting</option><option>Objects</option><option>Textiles</option></select></label>
<label class="lab-field"><span>Status</span><select class="rl-select" name="status"><option selected>Active</option><option>Draft</option><option>Archived</option></select></label>
<p data-rl-form-error class="lab-field-error" role="alert" hidden></p>
<footer class="lab-form-actions"><button type="button" class="rl-button lab-cancel" data-rl-close>Cancel</button><button type="submit" class="rl-button lab-add">Save changes</button></footer>
</form>
<div class="lab-danger-zone"><button type="button" class="rl-button lab-delete" aria-haspopup="dialog"
hx-get="/demo/products/6/delete" hx-target="#lab-confirm" hx-sync="#lab-confirm:replace">Delete product</button></div><div id="lab-confirm"></div>
</div>
</dialog></div>
</div></section>
</div>HTTP exchange
Use the preview to see the request and the HTML your server returns.Walkthrough · Finish a company task
- Open Forma Works and check its Open tasks count.
- Under Tasks, open Price the first retail rollout. Set Task status to Done and choose Save status.
- Open HTTP exchange to inspect the save. Use your browser’s Back button to return to Forma Works. The task now shows Done. Finishing an open task reduces the count by one.
Task move with List selected
POST /demo/studio/tasks
HX-Request: true
HX-Target: studio-workspace
Content-Type: application/x-www-form-urlencoded
operation=move&id=ST-103&company=forma&display=list&openTask=1&status=doneStudio validates the task and stage, then returns the updated #studio-workspace fragment. A successful save returns HTTP 200 and replaces the current history entry. An invalid stage returns HTTP 422 with the error. A native form submission redirects to the task with HTTP 303 on success.
Use in your app
Studio keeps companies, tasks and bookings in memory for the life of the demo server. The company profile counts open tasks from those same records.
Serve these assets from the download’s public/ directory. Add the tags to your page head.
Page assets
<link rel="stylesheet" href="/mero.css">
<link rel="stylesheet" href="/mero-layouts.css">
<link rel="stylesheet" href="/mero-inventory.css">
<link rel="stylesheet" href="/studio-workspace.css">
<link rel="stylesheet" href="/studio-companies.css">
<link rel="stylesheet" href="/studio-board.css">
<link rel="stylesheet" href="/studio-bookings.css">
<script defer src="/vendor/htmx.min.js"></script>
<script defer src="/mero.js"></script>
<script defer src="/mero-forms.js"></script>
<script defer src="/mero-inventory.js"></script>
<script defer src="/studio-board.js"></script>
<script defer src="/studio-display.js"></script>
<script defer src="/studio-workspace.js"></script>Server source · site/studio.mjs
Download full example source ↓