Studio mail
Archive shelf inventory
The sample shelf is ready for the handover. I’ve counted each finish and put a reference card in every tray.
Thanks for helping with the labels.
Initial server-rendered HTML
<section class="comm-frame" data-communication="mail" data-draft-scope="14d45d04-3fab-48d5-a5bf-bf724a569e95" data-mobile-view="detail" data-comm-focus="" hx-target="closest [data-communication]" hx-swap="outerHTML settle:0ms" hx-sync="closest [data-communication]:drop" hx-history="false">
<header class="comm-mast"><div class="comm-title"><svg class="comm-icon" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="5" width="18" height="14" rx="3"/><path d="m4 7 8 6 8-6"/></svg><h1>Studio mail</h1></div><span class="comm-identity">studio@north.example</span></header>
<div class="comm-split comm-mail-split" data-rlw-split data-rlw-snap data-rlw-snap-key="mail-reader"><aside id="mail-message-list" class="comm-list" aria-label="Mail folders and messages"><nav class="comm-folders" aria-label="Mail folders"><a href="/layouts/mail?folder=inbox" hx-get="/demo/layouts/mail?folder=inbox" hx-push-url="/layouts/mail?folder=inbox"><svg class="comm-icon" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round"><path d="m3 13 3-8h12l3 8v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z"/><path d="M3 13h5l2 3h4l2-3h5"/></svg>Inbox<span>4</span></a><a href="/layouts/mail?folder=archive" hx-get="/demo/layouts/mail?folder=archive" hx-push-url="/layouts/mail?folder=archive" aria-current="page"><svg class="comm-icon" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="4" rx="1"/><path d="M5 8v11h14V8m-10 4h6"/></svg>Archive<span>1</span></a></nav>
<div class="comm-listing"><a class="comm-mail-item" href="/layouts/mail?folder=archive&thread=samples" hx-get="/demo/layouts/mail?folder=archive&thread=samples" hx-push-url="/layouts/mail?folder=archive&thread=samples" aria-current="true">
<span aria-hidden="true" class="rl-avatar comm-avatar comm-sand comm-small">TS</span><span class="comm-mail-copy"><span class="comm-mail-line"><strong>Theo Sato</strong><span>Fri</span></span>
<span class="comm-subject"> <span class="comm-draft" data-comm-draft-for="samples" hidden>Draft</span> Archive shelf inventory</span><span class="comm-snippet">The sample shelf is ready for the handover.</span></span></a></div></aside><div class="rlw-split-handle" role="separator" tabindex="0"
aria-label="Resize message list" aria-controls="mail-message-list" aria-orientation="vertical"
aria-valuemin="30" aria-valuemax="52" aria-valuenow="33"></div><section class="comm-reader" aria-label="Open message"><div class="comm-reader-bar">
<a class="comm-back" href="/layouts/mail?folder=archive" hx-get="/demo/layouts/mail?folder=archive" hx-push-url="/layouts/mail?folder=archive"><svg class="comm-icon" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round"><path d="m14 6-6 6 6 6"/></svg> Messages</a><span class="comm-tag"><i></i>Archive</span>
<form method="post" action="/demo/layouts/mail/move" hx-post="/demo/layouts/mail/move" data-rl-form><input type="hidden" name="thread" value="samples"><input type="hidden" name="folder" value="archive"><input type="hidden" name="destination" value="inbox">
<button class="comm-text-action" type="submit"><svg class="comm-icon" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round"><path d="m3 13 3-8h12l3 8v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z"/><path d="M3 13h5l2 3h4l2-3h5"/></svg>Move to inbox</button><p class="comm-error" data-rl-form-error role="alert" hidden></p></form></div>
<div class="comm-letter"><h2 tabindex="-1" data-comm-heading>Archive shelf inventory</h2>
<div class="comm-byline"><span aria-hidden="true" class="rl-avatar comm-avatar comm-sand">TS</span><span><strong>Theo Sato</strong><small>To you</small></span><time>Friday</time></div>
<div class="comm-letter-body"><p>The sample shelf is ready for the handover. I’ve counted each finish and put a reference card in every tray.</p><p>Thanks for helping with the labels.</p></div></div>
<form class="comm-reply-form" method="post" action="/demo/layouts/mail/reply" hx-post="/demo/layouts/mail/reply" data-rl-form data-comm-compose="samples">
<input type="hidden" name="thread" value="samples"><input type="hidden" name="folder" value="archive"><input type="hidden" name="nonce" value="2a2bdcec-2587-4821-94ed-925e3381161c">
<label for="mail-reply"><svg class="comm-icon" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round"><path d="m10 5-6 6 6 5m-6-5h9c5 0 7 3 7 7"/></svg>Reply to Theo</label>
<textarea id="mail-reply" class="rl-textarea" name="message" rows="2" maxlength="1600" required placeholder="Write your reply…"></textarea>
<div id="mail-error"><p class="comm-error" data-rl-form-error role="alert" hidden></p></div><button class="rl-button rl-button-primary rl-button-sm" type="submit">Send reply <svg class="comm-icon" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round"><path d="m4 5 16 7-16 7 3-7zm3 7h13"/></svg></button>
</form></section></div>
</section>HTTP exchange
Use the preview to see the request and the HTML your server returns.Use in your app
GET /demo/layouts/mail renders the selected folder and message. The reply and move forms post to /demo/layouts/mail/reply and /demo/layouts/mail/move. On wide layouts, the Resizable divider learns where you leave the edge of the message list.
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-workspace.css">
<link rel="stylesheet" href="/communication-layouts.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-workspace.js"></script>
<script defer src="/communication-layouts.js"></script>Server source · site/communication-layouts.mjs
Download full example source ↓