Bootstrap 5 Email Inbox Layouts (4 Modern Designs)
Four modern email inbox layouts: a sidebar with folders, a tabbed mailbox with coloured labels, a compact preview list with search and filters, and a split view with a reading pane.
<section class="wdw-stage"><div class="container" style="max-width:860px">
<div class="mb-3"><span class="wdw-eyebrow">Email inbox</span><h1 class="wdw-heading h3 mb-0">Four ways to lay out an inbox</h1></div>
<svg width="0" height="0" style="position:absolute" aria-hidden="true"><defs>
<symbol id="i-star" viewBox="0 0 24 24"><path d="m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8L12 17.800 5.800 21l1.200-6.800-5-4.900 6.900-1z" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linejoin="round"/></symbol>
<symbol id="i-inbox" viewBox="0 0 24 24"><path d="M22 12h-6l-2 3h-4l-2-3H2M5.500 5.100 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.500-6.900A2 2 0 0 0 16.700 4H7.300a2 2 0 0 0-1.800 1.100z" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></symbol>
<symbol id="i-send" viewBox="0 0 24 24"><path d="M22 2 11 13M22 2l-7 20-4-9-9-4z" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></symbol>
<symbol id="i-file" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8zM14 2v6h6M8 13h8M8 17h5" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></symbol>
<symbol id="i-trash" viewBox="0 0 24 24"><path d="M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M10 11v6M14 11v6" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></symbol>
<symbol id="i-plus" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></symbol>
<symbol id="i-clip" viewBox="0 0 24 24"><path d="m21.400 11.100-9.200 9.200a6 6 0 0 1-8.500-8.500l9.200-9.200a4 4 0 0 1 5.700 5.700l-9.200 9.200a2 2 0 0 1-2.800-2.800l8.500-8.500" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></symbol>
<symbol id="i-search" viewBox="0 0 24 24"><circle cx="11" cy="11" r="7" fill="none" stroke="currentColor" stroke-width="1.8"/><path d="m21 21-4.300-4.300" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></symbol>
</defs></svg><article class="wdw-card mb-4 overflow-hidden" aria-labelledby="mv1">
<div class="mv-head"><span class="wdw-eyebrow">Style 1</span><h2 class="h6 mb-0" id="mv1">Sidebar and message list</h2></div>
<div class="row g-0">
<nav class="col-md-3 border-end p-3 nav1" aria-label="Folders">
<button type="button" class="btn btn-primary rounded-pill w-100 mb-3"><svg width="16" height="16" aria-hidden="true"><use href="#i-plus"/></svg> Compose</button>
<ul class="nav nav-pills flex-column gap-1 folders">
<li><a class="nav-link active" href="#" aria-current="page"><svg width="16" height="16" aria-hidden="true"><use href="#i-inbox"/></svg><span>Inbox</span><span class="badge rounded-pill ms-auto">42</span></a></li>
<li><a class="nav-link" href="#"><svg width="16" height="16" aria-hidden="true"><use href="#i-star"/></svg><span>Starred</span></a></li>
<li><a class="nav-link" href="#"><svg width="16" height="16" aria-hidden="true"><use href="#i-send"/></svg><span>Sent</span></a></li>
<li><a class="nav-link" href="#"><svg width="16" height="16" aria-hidden="true"><use href="#i-file"/></svg><span>Drafts</span><span class="badge rounded-pill ms-auto">3</span></a></li>
</ul>
<p class="wdw-eyebrow mt-4 mb-2 px-2">Labels</p>
<ul class="list-unstyled d-grid gap-1 small m-0 px-2"><li class="d-flex align-items-center gap-2"><span class="rounded-circle bg-primary flex-none" style="width:8px;height:8px"></span>Work</li><li class="d-flex align-items-center gap-2"><span class="rounded-circle bg-primary-subtle border border-primary-subtle flex-none" style="width:8px;height:8px"></span>Billing</li><li class="d-flex align-items-center gap-2"><span class="rounded-circle bg-secondary-subtle flex-none" style="width:8px;height:8px"></span>People</li></ul>
<div class="mt-4 px-2"><div class="d-flex justify-content-between small mb-1"><span class="text-body-secondary">Storage</span><span>7.2 of 15 GB</span></div><div class="progress" style="height:5px" role="progressbar" aria-label="Storage used" aria-valuenow="48" aria-valuemin="0" aria-valuemax="100"><div class="progress-bar" style="width:48%"></div></div></div>
</nav>
<div class="col-md-9">
<div class="d-flex align-items-center gap-3 px-3 py-2 border-bottom">
<input class="form-check-input m-0 check-all" type="checkbox" aria-label="Select all">
<button type="button" class="btn btn-sm btn-outline-secondary rounded-pill text-body"><svg width="14" height="14" aria-hidden="true"><use href="#i-trash"/></svg> Delete</button>
<span class="ms-auto small text-body-secondary">1-4 of 277</span></div>
<ul class="list-unstyled m-0"><li class="mrow unread"><input class="form-check-input m-0 row-check" type="checkbox" aria-label="Select Jennifer Poyem"><button type="button" class="star on" aria-pressed="true" aria-label="Star message from Jennifer Poyem"><svg width="18" height="18" aria-hidden="true"><use href="#i-star"/></svg></button><img src="https://i.pravatar.cc/72?img=11" alt="" width="36" height="36" class="rounded-circle flex-none"><div class="min-w-0 flex-grow-1"><div class="d-flex gap-2"><span class="who text-truncate">Jennifer Poyem</span><time class="ms-auto small text-body-secondary text-nowrap">Today, 9:14</time></div><div class="text-truncate"><span class="subj">Q3 roadmap review</span><span class="text-body-secondary d-none d-sm-inline"> - Sharing the draft slides before Thursday's sync, comments welcome.</span></div></div></li>
<li class="mrow unread"><input class="form-check-input m-0 row-check" type="checkbox" aria-label="Select Clara Wati"><button type="button" class="star" aria-pressed="false" aria-label="Star message from Clara Wati"><svg width="18" height="18" aria-hidden="true"><use href="#i-star"/></svg></button><img src="https://i.pravatar.cc/72?img=5" alt="" width="36" height="36" class="rounded-circle flex-none"><div class="min-w-0 flex-grow-1"><div class="d-flex gap-2"><span class="who text-truncate">Clara Wati</span><time class="ms-auto small text-body-secondary text-nowrap">Today, 8:02</time></div><div class="text-truncate"><span class="subj">Your invoice is ready</span><span class="text-body-secondary d-none d-sm-inline"> - Invoice #2048 for September is attached. Payment is due in 14 days.</span></div></div></li>
<li class="mrow "><input class="form-check-input m-0 row-check" type="checkbox" aria-label="Select Toni Mriang"><button type="button" class="star on" aria-pressed="true" aria-label="Star message from Toni Mriang"><svg width="18" height="18" aria-hidden="true"><use href="#i-star"/></svg></button><img src="https://i.pravatar.cc/72?img=12" alt="" width="36" height="36" class="rounded-circle flex-none"><div class="min-w-0 flex-grow-1"><div class="d-flex gap-2"><span class="who text-truncate">Toni Mriang</span><time class="ms-auto small text-body-secondary text-nowrap">Yesterday</time></div><div class="text-truncate"><span class="subj">Design handoff: onboarding</span><span class="text-body-secondary d-none d-sm-inline"> - All screens are in the Figma file with specs and exported assets.</span></div></div></li>
<li class="mrow "><input class="form-check-input m-0 row-check" type="checkbox" aria-label="Select Bella Negro"><button type="button" class="star" aria-pressed="false" aria-label="Star message from Bella Negro"><svg width="18" height="18" aria-hidden="true"><use href="#i-star"/></svg></button><img src="https://i.pravatar.cc/72?img=9" alt="" width="36" height="36" class="rounded-circle flex-none"><div class="min-w-0 flex-grow-1"><div class="d-flex gap-2"><span class="who text-truncate">Bella Negro</span><time class="ms-auto small text-body-secondary text-nowrap">Oct 26</time></div><div class="text-truncate"><span class="subj">Monthly sales report</span><span class="text-body-secondary d-none d-sm-inline"> - Revenue is up 12% on last month, with the biggest gains in annual plans.</span></div></div></li>
</ul></div></div></article><article class="wdw-card mb-4 overflow-hidden" aria-labelledby="mv2">
<div class="mv-head"><span class="wdw-eyebrow">Style 2</span><h2 class="h6 mb-0" id="mv2">Tabbed mailbox with labels</h2></div>
<div class="px-3 pt-3 d-flex flex-column flex-sm-row align-items-sm-center gap-3">
<div><div class="h4 wdw-heading mb-0">350 unread</div><div class="small text-body-secondary">Across all labels</div></div>
<div class="ms-sm-auto d-flex gap-2 hdr2"><button type="button" class="btn btn-sm btn-primary rounded-pill px-3 flex-fill"><svg width="14" height="14" aria-hidden="true"><use href="#i-plus"/></svg> Compose</button><button type="button" class="btn btn-sm btn-outline-secondary border-secondary-subtle text-body rounded-pill px-3 flex-fill"><svg width="14" height="14" aria-hidden="true"><use href="#i-trash"/></svg> Delete</button></div></div>
<ul class="nav nav-underline px-3 mt-2 border-bottom" role="tablist" aria-label="Mailbox">
<li class="nav-item" role="presentation"><button class="nav-link active" data-bs-toggle="tab" data-bs-target="#mbInbox" type="button" role="tab" id="tab-mbInbox" aria-controls="mbInbox" aria-selected="true">Inbox</button></li>
<li class="nav-item" role="presentation"><button class="nav-link" data-bs-toggle="tab" data-bs-target="#mbSent" type="button" role="tab" id="tab-mbSent" aria-controls="mbSent" aria-selected="false">Sent</button></li>
<li class="nav-item" role="presentation"><button class="nav-link" data-bs-toggle="tab" data-bs-target="#mbSpam" type="button" role="tab" id="tab-mbSpam" aria-controls="mbSpam" aria-selected="false">Spam</button></li></ul>
<div class="tab-content"><div class="tab-pane fade show active" id="mbInbox" role="tabpanel" aria-labelledby="tab-mbInbox" tabindex="0"><ul class="list-unstyled m-0"><li class="mrow unread"><input class="form-check-input m-0 row-check" type="checkbox" aria-label="Select Jennifer Poyem"><button type="button" class="star on" aria-pressed="true" aria-label="Star message from Jennifer Poyem"><svg width="18" height="18" aria-hidden="true"><use href="#i-star"/></svg></button><span class="who text-truncate flex-none who2">Jennifer Poyem</span><span class="badge bg-primary-subtle text-primary-emphasis rounded-pill flex-none d-none d-sm-inline-block">Work</span><span class="subj text-truncate flex-grow-1">Q3 roadmap review</span><svg width="14" height="14" class="text-body-secondary flex-none" aria-hidden="true"><use href="#i-clip"/></svg><time class="small text-body-secondary text-nowrap">Today</time></li>
<li class="mrow unread"><input class="form-check-input m-0 row-check" type="checkbox" aria-label="Select Clara Wati"><button type="button" class="star" aria-pressed="false" aria-label="Star message from Clara Wati"><svg width="18" height="18" aria-hidden="true"><use href="#i-star"/></svg></button><span class="who text-truncate flex-none who2">Clara Wati</span><span class="badge bg-primary-subtle text-primary-emphasis rounded-pill flex-none d-none d-sm-inline-block">Billing</span><span class="subj text-truncate flex-grow-1">Your invoice is ready</span><svg width="14" height="14" class="text-body-secondary flex-none" aria-hidden="true"><use href="#i-clip"/></svg><time class="small text-body-secondary text-nowrap">Today</time></li>
<li class="mrow "><input class="form-check-input m-0 row-check" type="checkbox" aria-label="Select Toni Mriang"><button type="button" class="star on" aria-pressed="true" aria-label="Star message from Toni Mriang"><svg width="18" height="18" aria-hidden="true"><use href="#i-star"/></svg></button><span class="who text-truncate flex-none who2">Toni Mriang</span><span class="badge bg-primary-subtle text-primary-emphasis rounded-pill flex-none d-none d-sm-inline-block">Design</span><span class="subj text-truncate flex-grow-1">Design handoff: onboarding</span><svg width="14" height="14" class="text-body-secondary flex-none" aria-hidden="true"><use href="#i-clip"/></svg><time class="small text-body-secondary text-nowrap">Yesterday</time></li>
<li class="mrow "><input class="form-check-input m-0 row-check" type="checkbox" aria-label="Select Bella Negro"><button type="button" class="star" aria-pressed="false" aria-label="Star message from Bella Negro"><svg width="18" height="18" aria-hidden="true"><use href="#i-star"/></svg></button><span class="who text-truncate flex-none who2">Bella Negro</span><span class="badge bg-primary-subtle text-primary-emphasis rounded-pill flex-none d-none d-sm-inline-block">Work</span><span class="subj text-truncate flex-grow-1">Monthly sales report</span><svg width="14" height="14" class="text-body-secondary flex-none" aria-hidden="true"><use href="#i-clip"/></svg><time class="small text-body-secondary text-nowrap">Oct 26</time></li>
<li class="mrow "><input class="form-check-input m-0 row-check" type="checkbox" aria-label="Select Kim Mbako"><button type="button" class="star" aria-pressed="false" aria-label="Star message from Kim Mbako"><svg width="18" height="18" aria-hidden="true"><use href="#i-star"/></svg></button><span class="who text-truncate flex-none who2">Kim Mbako</span><span class="badge bg-primary-subtle text-primary-emphasis rounded-pill flex-none d-none d-sm-inline-block">People</span><span class="subj text-truncate flex-grow-1">Welcome to the team!</span><svg width="14" height="14" class="text-body-secondary flex-none" aria-hidden="true"><use href="#i-clip"/></svg><time class="small text-body-secondary text-nowrap">Oct 25</time></li>
</ul></div>
<div class="tab-pane fade" id="mbSent" role="tabpanel" aria-labelledby="tab-mbSent" tabindex="0"><p class="empty">You sent 18 messages this week.</p></div>
<div class="tab-pane fade" id="mbSpam" role="tabpanel" aria-labelledby="tab-mbSpam" tabindex="0"><p class="empty">No spam. Nice and tidy.</p></div></div></article><article class="wdw-card mb-4 overflow-hidden" aria-labelledby="mv3">
<div class="mv-head"><span class="wdw-eyebrow">Style 3</span><h2 class="h6 mb-0" id="mv3">Compact inbox with previews</h2></div>
<div class="p-3 pb-2 d-flex gap-2"><div class="input-group"><span class="input-group-text bg-body-tertiary border-0 rounded-start-pill ps-3"><svg width="16" height="16" aria-hidden="true"><use href="#i-search"/></svg></span><input type="search" class="form-control bg-body-tertiary border-0 rounded-end-pill" placeholder="Search mail" aria-label="Search mail"></div>
<div class="btn-group f3" role="group" aria-label="Filter"><input type="radio" class="btn-check" name="f3" id="f3a" checked><label class="btn btn-outline-secondary border-secondary-subtle rounded-start-pill px-3" for="f3a">All</label><input type="radio" class="btn-check" name="f3" id="f3b"><label class="btn btn-outline-secondary border-secondary-subtle rounded-end-pill px-3" for="f3b">Unread</label></div></div>
<ul class="list-unstyled m-0 px-2 pb-2 inbox3"><li class="mrow card3 unread"><img src="https://i.pravatar.cc/72?img=11" alt="" width="36" height="36" class="rounded-circle flex-none"><div class="min-w-0 flex-grow-1"><div class="d-flex align-items-baseline gap-2"><span class="who">Jennifer Poyem</span><time class="ms-auto small text-body-secondary text-nowrap">Today, 9:14</time></div><div class="subj text-truncate">Q3 roadmap review</div><div class="text-body-secondary small text-truncate">Sharing the draft slides before Thursday's sync, comments welcome.</div></div><button type="button" class="star on" aria-pressed="true" aria-label="Star message from Jennifer Poyem"><svg width="18" height="18" aria-hidden="true"><use href="#i-star"/></svg></button></li>
<li class="mrow card3 unread"><img src="https://i.pravatar.cc/72?img=5" alt="" width="36" height="36" class="rounded-circle flex-none"><div class="min-w-0 flex-grow-1"><div class="d-flex align-items-baseline gap-2"><span class="who">Clara Wati</span><time class="ms-auto small text-body-secondary text-nowrap">Today, 8:02</time></div><div class="subj text-truncate">Your invoice is ready</div><div class="text-body-secondary small text-truncate">Invoice #2048 for September is attached. Payment is due in 14 days.</div></div><button type="button" class="star" aria-pressed="false" aria-label="Star message from Clara Wati"><svg width="18" height="18" aria-hidden="true"><use href="#i-star"/></svg></button></li>
<li class="mrow card3 "><img src="https://i.pravatar.cc/72?img=12" alt="" width="36" height="36" class="rounded-circle flex-none"><div class="min-w-0 flex-grow-1"><div class="d-flex align-items-baseline gap-2"><span class="who">Toni Mriang</span><time class="ms-auto small text-body-secondary text-nowrap">Yesterday</time></div><div class="subj text-truncate">Design handoff: onboarding</div><div class="text-body-secondary small text-truncate">All screens are in the Figma file with specs and exported assets.</div></div><button type="button" class="star on" aria-pressed="true" aria-label="Star message from Toni Mriang"><svg width="18" height="18" aria-hidden="true"><use href="#i-star"/></svg></button></li>
<li class="mrow card3 "><img src="https://i.pravatar.cc/72?img=9" alt="" width="36" height="36" class="rounded-circle flex-none"><div class="min-w-0 flex-grow-1"><div class="d-flex align-items-baseline gap-2"><span class="who">Bella Negro</span><time class="ms-auto small text-body-secondary text-nowrap">Oct 26</time></div><div class="subj text-truncate">Monthly sales report</div><div class="text-body-secondary small text-truncate">Revenue is up 12% on last month, with the biggest gains in annual plans.</div></div><button type="button" class="star" aria-pressed="false" aria-label="Star message from Bella Negro"><svg width="18" height="18" aria-hidden="true"><use href="#i-star"/></svg></button></li>
</ul></article><article class="wdw-card overflow-hidden" aria-labelledby="mv4">
<div class="mv-head"><span class="wdw-eyebrow">Style 4</span><h2 class="h6 mb-0" id="mv4">Split view with reading pane</h2></div>
<div class="row g-0"><div class="col-md-5 border-end"><ul class="list-unstyled m-0 p-2"><li><button type="button" class="pane-item active unread" aria-current="true" data-from="Jennifer Poyem" data-body="Hi there, hope your week is going well. I wanted to share a quick update and get your thoughts before we lock things in. Let me know if anything looks off and we can jump on a call." data-subj="Q3 roadmap review" data-time="Today, 9:14" data-img="11"><span class="d-flex gap-2"><span class="who text-truncate">Jennifer Poyem</span><time class="ms-auto small text-body-secondary text-nowrap">Today</time></span><span class="subj d-block text-truncate">Q3 roadmap review</span><span class="small text-body-secondary d-block text-truncate">Sharing the draft slides before Thursday's sync, comments welcome.</span></button></li>
<li><button type="button" class="pane-item unread" data-from="Clara Wati" data-body="Hello, your invoice #2048 for September is attached. Payment is due within 14 days. Reply here if you need a PO number added or a different billing contact." data-subj="Your invoice is ready" data-time="Today, 8:02" data-img="5"><span class="d-flex gap-2"><span class="who text-truncate">Clara Wati</span><time class="ms-auto small text-body-secondary text-nowrap">Today</time></span><span class="subj d-block text-truncate">Your invoice is ready</span><span class="small text-body-secondary d-block text-truncate">Invoice #2048 for September is attached. Payment is due in 14 days.</span></button></li>
<li><button type="button" class="pane-item " data-from="Toni Mriang" data-body="The onboarding screens are all in the Figma file, with specs, states and exported assets. Ping me if anything is unclear before engineering picks it up." data-subj="Design handoff: onboarding" data-time="Yesterday" data-img="12"><span class="d-flex gap-2"><span class="who text-truncate">Toni Mriang</span><time class="ms-auto small text-body-secondary text-nowrap">Yesterday</time></span><span class="subj d-block text-truncate">Design handoff: onboarding</span><span class="small text-body-secondary d-block text-truncate">All screens are in the Figma file with specs and exported assets.</span></button></li>
<li><button type="button" class="pane-item " data-from="Bella Negro" data-body="Revenue is up 12% on last month, driven mostly by annual plans. The full breakdown by region and plan is attached, with churn flat at 2.1%." data-subj="Monthly sales report" data-time="Oct 26" data-img="9"><span class="d-flex gap-2"><span class="who text-truncate">Bella Negro</span><time class="ms-auto small text-body-secondary text-nowrap">Oct 26</time></span><span class="subj d-block text-truncate">Monthly sales report</span><span class="small text-body-secondary d-block text-truncate">Revenue is up 12% on last month, with the biggest gains in annual plans.</span></button></li>
</ul></div>
<div class="col-md-7 p-4" id="readPane" aria-live="polite">
<div class="d-flex align-items-center gap-3 mb-3"><img id="rpImg" src="https://i.pravatar.cc/72?img=11" alt="" width="44" height="44" class="rounded-circle"><div><strong id="rpFrom">Jennifer Poyem</strong><div class="small text-body-secondary" id="rpTime">Today, 9:14</div></div>
<div class="ms-auto d-flex gap-1"><button class="btn btn-sm btn-outline-secondary border-0 text-body" type="button" aria-label="Delete"><svg width="16" height="16" aria-hidden="true"><use href="#i-trash"/></svg></button></div></div>
<h3 class="h5 wdw-heading" id="rpSubj">Q3 roadmap review</h3>
<p class="text-body-secondary mb-4" id="rpBody">Hi there, hope your week is going well. I wanted to share a quick update and get your thoughts before we lock things in. Let me know if anything looks off and we can jump on a call.</p>
<button type="button" class="btn btn-primary rounded-pill px-4"><svg width="16" height="16" aria-hidden="true"><use href="#i-send"/></svg> Reply</button></div></div></article>
</div></section>
/* Web Designer Wall library style — shared base for every Bootstrap 5 snippet.
Indigo accent, Plus Jakarta Sans, soft cards, pill buttons. Works in light and dark. */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");
:root,
[data-bs-theme="light"] {
--wdw-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
--bs-body-font-family: var(--wdw-font);
--bs-primary: #4f46e5;
--bs-primary-rgb: 79, 70, 229;
--bs-primary-text-emphasis: #3730a3;
--bs-primary-bg-subtle: #eef2ff;
--bs-primary-border-subtle: #c7d2fe;
--bs-link-color: #4f46e5;
--bs-link-color-rgb: 79, 70, 229;
--bs-link-hover-color: #4338ca;
--bs-link-hover-color-rgb: 67, 56, 202;
--bs-focus-ring-color: rgba(79, 70, 229, 0.25);
--bs-border-radius: 0.75rem;
--bs-border-radius-lg: 1rem;
--bs-border-radius-xl: 1.25rem;
--wdw-radius-card: 1.25rem;
--wdw-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 16px 40px -16px rgba(16, 24, 40, 0.22);
--wdw-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 12px -4px rgba(16, 24, 40, 0.12);
--wdw-stage: #f5f6fb;
}
[data-bs-theme="dark"] {
--bs-primary: #818cf8;
--bs-primary-rgb: 129, 140, 248;
--bs-primary-text-emphasis: #c7d2fe;
--bs-primary-bg-subtle: rgba(129, 140, 248, 0.14);
--bs-primary-border-subtle: rgba(129, 140, 248, 0.35);
--bs-link-color: #a5b4fc;
--bs-link-color-rgb: 165, 180, 252;
--bs-link-hover-color: #c7d2fe;
--bs-link-hover-color-rgb: 199, 210, 254;
--bs-focus-ring-color: rgba(129, 140, 248, 0.35);
--wdw-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -16px rgba(0, 0, 0, 0.7);
--wdw-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px -4px rgba(0, 0, 0, 0.5);
--wdw-stage: #0f1117;
}
body { font-family: var(--wdw-font); -webkit-font-smoothing: antialiased; }
/* Bootstrap compiles its blue into these components; point them at the accent. */
.btn-primary {
--bs-btn-bg: var(--bs-primary); --bs-btn-border-color: var(--bs-primary);
--bs-btn-hover-bg: #4338ca; --bs-btn-hover-border-color: #4338ca;
--bs-btn-active-bg: #3730a3; --bs-btn-active-border-color: #3730a3;
--bs-btn-disabled-bg: var(--bs-primary); --bs-btn-disabled-border-color: var(--bs-primary);
--bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}
[data-bs-theme="dark"] .btn-primary { --bs-btn-color: #0f1117; --bs-btn-hover-bg: #a5b4fc; --bs-btn-hover-border-color: #a5b4fc; --bs-btn-hover-color: #0f1117; --bs-btn-active-color: #0f1117; }
.btn-outline-primary {
--bs-btn-color: var(--bs-primary); --bs-btn-border-color: var(--bs-primary);
--bs-btn-hover-bg: var(--bs-primary); --bs-btn-hover-border-color: var(--bs-primary);
--bs-btn-active-bg: var(--bs-primary); --bs-btn-active-border-color: var(--bs-primary);
--bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}
.btn { --bs-btn-font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.btn-sm { min-height: 36px; }
.form-control, .form-select { min-height: 44px; border-radius: .75rem; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: rgba(var(--bs-primary-rgb), .6); box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.form-check-input:checked { background-color: var(--bs-primary); border-color: var(--bs-primary); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--bs-primary); }
.nav { --bs-nav-link-color: var(--bs-secondary-color); --bs-nav-link-hover-color: var(--bs-emphasis-color); }
.pagination { --bs-pagination-active-bg: var(--bs-primary); --bs-pagination-active-border-color: var(--bs-primary); --bs-pagination-color: var(--bs-body-color); --bs-pagination-focus-box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.progress, .progress-stacked { --bs-progress-bar-bg: var(--bs-primary); }
.list-group { --bs-list-group-active-bg: var(--bs-primary); --bs-list-group-active-border-color: var(--bs-primary); }
.dropdown-menu { --bs-dropdown-link-active-bg: var(--bs-primary); border-radius: .875rem; box-shadow: var(--wdw-shadow-sm); }
.accordion { --bs-accordion-active-bg: var(--bs-primary-bg-subtle); --bs-accordion-active-color: var(--bs-primary-text-emphasis); --bs-accordion-btn-focus-box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.badge { font-weight: 600; }
/* Library building blocks — use these instead of re-inventing them per snippet. */
.wdw-stage { min-height: 100vh; display: flex; align-items: center; background: var(--wdw-stage); padding-block: 3rem; }
.wdw-card { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent); border-radius: var(--wdw-radius-card); box-shadow: var(--wdw-shadow); }
.wdw-card-sm { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent); border-radius: 1rem; box-shadow: var(--wdw-shadow-sm); }
.wdw-aurora { position: relative; color: #fff; background: radial-gradient(60% 55% at 100% 0, #818cf8 0, transparent 70%), radial-gradient(65% 60% at 0 100%, #ec4899 0, transparent 65%), #1e1b4b; }
.wdw-eyebrow { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bs-primary); }
.wdw-heading { font-weight: 800; letter-spacing: -.02em; color: var(--bs-emphasis-color); }
.wdw-muted { color: var(--bs-secondary-color); }
.wdw-icon { width: 2.75rem; height: 2.75rem; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: .875rem; background: var(--bs-primary-bg-subtle); color: var(--bs-primary); }
/* Component */
.mv-head { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border-bottom: 1px solid var(--bs-border-color); background: var(--bs-tertiary-bg); }
.mv-head .wdw-eyebrow { white-space: nowrap; }
.min-w-0 { min-width: 0; }
.flex-none { flex: none; }
.mrow { display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; border-bottom: 1px solid var(--bs-border-color-translucent); font-size: .9rem; }
.mrow:last-child { border-bottom: 0; }
.mrow:hover { background: var(--bs-tertiary-bg); }
.mrow .who { font-weight: 500; }
.mrow .subj { color: var(--bs-secondary-color); }
.mrow.unread .who, .mrow.unread .subj, .pane-item.unread .who, .pane-item.unread .subj { font-weight: 700; color: var(--bs-emphasis-color); }
.star { border: 0; background: none; padding: 0; color: var(--bs-secondary-color); opacity: .6; display: inline-flex; flex: none; }
.star.on { color: var(--bs-primary); opacity: 1; }
.star.on use { fill: currentColor; }
.star svg { fill: none; }
.folders .nav-link { display: flex; align-items: center; gap: .65rem; border-radius: 999px; padding: .5rem .85rem; font-size: .9rem; color: var(--bs-body-color); }
.folders .nav-link.active { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); font-weight: 600; }
.folders .badge { background: var(--bs-primary); color: #fff; }
[data-bs-theme="dark"] .folders .badge { color: #0f1117; }
.nav-underline { --bs-nav-underline-link-active-color: var(--bs-primary); --bs-nav-underline-gap: 1.5rem; }
.nav-underline .nav-link.active { border-bottom-color: var(--bs-primary); }
.empty { margin: 0; padding: 2.5rem 1rem; text-align: center; color: var(--bs-secondary-color); }
.card3 { border-radius: .875rem; align-items: center; padding-block: .7rem; }
.card3:last-child { border-bottom: 0; }
.pane-item { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--bs-body-color); padding: .75rem; border-radius: .875rem; font-size: .9rem; }
.pane-item:hover { background: var(--bs-tertiary-bg); }
.pane-item.active { background: var(--bs-primary-bg-subtle); }
.pane-item .subj { color: var(--bs-secondary-color); }
@media (max-width: 767.98px) { #readPane { border-top: 1px solid var(--bs-border-color); } .nav1 { border-right: 0 !important; border-bottom: 1px solid var(--bs-border-color); } .mrow { padding-inline: .75rem; } }
.form-check-input { border-color: color-mix(in srgb, var(--bs-body-color) 40%, transparent); }
.who2 { width: 130px; }
.f3 .btn { min-height: 44px; }
.f3 .btn-check:checked + .btn { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); border-color: var(--bs-primary-border-subtle); }
.f3 .btn-check:focus-visible + .btn { box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.inbox3 .input-group-text { min-height: 44px; }
@media (max-width: 575.98px) { .who2 { width: 84px; } .hdr2 .btn { width: 100%; } }
.mrow .badge { min-width: 4.5rem; }
function initStars() {
document.querySelectorAll('.star').forEach(function (b) {
b.addEventListener('click', function () {
const on = b.classList.toggle('on');
b.setAttribute('aria-pressed', on);
});
});
}
function initSelectAll() {
const all = document.querySelector('.check-all');
if (!all) return;
const rows = all.closest('.col-md-9').querySelectorAll('.row-check');
all.addEventListener('change', function () { rows.forEach(function (c) { c.checked = all.checked; }); });
rows.forEach(function (c) {
c.addEventListener('change', function () {
const n = Array.prototype.filter.call(rows, function (r) { return r.checked; }).length;
all.checked = n === rows.length;
all.indeterminate = n > 0 && n < rows.length;
});
});
}
function initUnreadFilter() {
const unread = document.getElementById('f3b');
const all = document.getElementById('f3a');
const list = document.querySelector('.inbox3');
if (!unread || !all || !list) return;
function apply() {
list.querySelectorAll('.mrow').forEach(function (r) { r.hidden = unread.checked && !r.classList.contains('unread'); });
}
unread.addEventListener('change', apply);
all.addEventListener('change', apply);
}
function initReadingPane() {
const items = document.querySelectorAll('.pane-item');
if (!items.length) return;
items.forEach(function (it) {
it.addEventListener('click', function () {
items.forEach(function (o) { o.classList.remove('active'); o.removeAttribute('aria-current'); });
it.classList.add('active');
it.setAttribute('aria-current', 'true');
it.classList.remove('unread');
document.getElementById('rpFrom').textContent = it.dataset.from;
document.getElementById('rpBody').textContent = it.dataset.body;
document.getElementById('rpSubj').textContent = it.dataset.subj;
document.getElementById('rpTime').textContent = it.dataset.time;
document.getElementById('rpImg').src = 'https://i.pravatar.cc/72?img=' + it.dataset.img;
});
});
}
initStars();
initSelectAll();
initUnreadFilter();
initReadingPane();
function initFolders() {
const links = document.querySelectorAll('.folders .nav-link');
links.forEach(function (a) {
a.addEventListener('click', function (e) {
e.preventDefault();
links.forEach(function (o) { o.classList.remove('active'); o.removeAttribute('aria-current'); });
a.classList.add('active');
a.setAttribute('aria-current', 'page');
});
});
}
initFolders();
Built on Bootstrap 5.3.8 with plain JavaScript — no jQuery. Supports light and dark mode via data-bs-theme.