Snippets Email

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.

Bootstrap 5 No jQuery Apr 2020 3.9K views

<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>

Built on Bootstrap 5.3.8 with plain JavaScript — no jQuery. Supports light and dark mode via data-bs-theme.

Free to use in personal and commercial projects under the MIT license.