Snippets Email

Bootstrap 5 Email Inbox Layout

An email inbox layout with a folder and label sidebar, a bulk-action toolbar, and a message list with checkboxes, stars, labels, attachments and timestamps.

Bootstrap 5 No jQuery Oct 2020 2.2K views

<section class="wdw-stage">
  <div class="container" style="max-width: 1120px">
    <div class="wdw-card overflow-hidden mb-shell">
      <div class="row g-0">
        <aside class="col-lg-3 p-3 p-lg-4 bg-body-tertiary mb-side">
          <div class="d-flex align-items-center justify-content-between mb-3 mb-lg-4">
            <h2 class="wdw-heading h4 mb-0">Mail</h2>
          </div>
          <button type="button" class="btn btn-primary rounded-pill w-100 mb-3"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 5v14"/><path d="M5 12h14"/></svg> Compose</button>
          <ul class="list-unstyled mb-3 mb-lg-4 d-grid gap-1"><li><a href="#" class="mb-folder d-flex align-items-center gap-3 px-3 py-2 rounded-3 text-decoration-none active" aria-current="page"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M22 12h-6l-2 3h-4l-2-3H2"/><path d="M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11Z"/></svg><span class="flex-grow-1">Inbox</span><span class="badge rounded-pill text-bg-primary mb-fbadge">8</span></a></li><li><a href="#" class="mb-folder d-flex align-items-center gap-3 px-3 py-2 rounded-3 text-decoration-none"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8-6.2-3.3-6.2 3.3L7 14.2 2 9.3l6.9-1L12 2Z"/></svg><span class="flex-grow-1">Starred</span></a></li><li><a href="#" class="mb-folder d-flex align-items-center gap-3 px-3 py-2 rounded-3 text-decoration-none"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z"/><path d="M14 2v6h6"/><path d="M16 13H8"/><path d="M16 17H8"/></svg><span class="flex-grow-1">Drafts</span><span class="badge rounded-pill text-bg-secondary mb-fbadge">20</span></a></li><li><a href="#" class="mb-folder d-flex align-items-center gap-3 px-3 py-2 rounded-3 text-decoration-none"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m22 2-7 20-4-9-9-4Z"/><path d="M22 2 11 13"/></svg><span class="flex-grow-1">Sent</span></a></li><li><a href="#" class="mb-folder d-flex align-items-center gap-3 px-3 py-2 rounded-3 text-decoration-none"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 6h18"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg><span class="flex-grow-1">Trash</span><span class="badge rounded-pill text-bg-secondary mb-fbadge">354</span></a></li></ul>
          <div class="wdw-eyebrow mb-2 px-3 text-body-secondary d-none d-lg-block">Labels</div>
          <ul class="list-unstyled mb-0 d-none d-lg-grid gap-1"><li><a href="#" class="mb-folder d-flex align-items-center gap-3 px-3 py-2 rounded-3 text-decoration-none"><span class="text-primary"><svg width="10" height="10" viewBox="0 0 8 8" aria-hidden="true"><circle cx="4" cy="4" r="4" fill="currentColor"/></svg></span><span>Web app</span></a></li><li><a href="#" class="mb-folder d-flex align-items-center gap-3 px-3 py-2 rounded-3 text-decoration-none"><span class="text-warning"><svg width="10" height="10" viewBox="0 0 8 8" aria-hidden="true"><circle cx="4" cy="4" r="4" fill="currentColor"/></svg></span><span>Project one</span></a></li><li><a href="#" class="mb-folder d-flex align-items-center gap-3 px-3 py-2 rounded-3 text-decoration-none"><span class="text-info"><svg width="10" height="10" viewBox="0 0 8 8" aria-hidden="true"><circle cx="4" cy="4" r="4" fill="currentColor"/></svg></span><span>Project two</span></a></li><li><a href="#" class="mb-folder d-flex align-items-center gap-3 px-3 py-2 rounded-3 text-decoration-none"><span class="text-danger"><svg width="10" height="10" viewBox="0 0 8 8" aria-hidden="true"><circle cx="4" cy="4" r="4" fill="currentColor"/></svg></span><span>Friends</span></a></li><li><a href="#" class="mb-folder d-flex align-items-center gap-3 px-3 py-2 rounded-3 text-decoration-none"><span class="text-success"><svg width="10" height="10" viewBox="0 0 8 8" aria-hidden="true"><circle cx="4" cy="4" r="4" fill="currentColor"/></svg></span><span>Family</span></a></li></ul>
        </aside>
        <div class="col-lg-9">
          <div class="d-flex align-items-center flex-wrap gap-2 px-3 py-3 border-bottom mb-toolbar">
            <div class="form-check mb-0 ms-1 me-2">
              <input class="form-check-input" type="checkbox" id="mbAll" aria-label="Select all messages">
            </div>
            <div class="btn-group" role="group" aria-label="Message actions">
              <button type="button" class="btn btn-sm btn-outline-secondary mb-act" data-act="archive" title="Archive" aria-label="Archive selected"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect width="20" height="5" x="2" y="3" rx="1"/><path d="M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8"/><path d="M10 12h4"/></svg></button>
              <button type="button" class="btn btn-sm btn-outline-secondary mb-act" data-act="read" title="Mark as read" aria-label="Mark selected as read"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect width="20" height="16" x="2" y="4" rx="2"/><path d="m22 7-10 5L2 7"/></svg></button>
              <button type="button" class="btn btn-sm btn-outline-secondary mb-act" data-act="delete" title="Delete" aria-label="Delete selected"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 6h18"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg></button>
            </div>
            <div class="dropdown">
              <button class="btn btn-sm btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">More</button>
              <ul class="dropdown-menu">
                <li><button class="dropdown-item mb-act" type="button" data-act="read-all">Mark all as read</button></li>
                <li><button class="dropdown-item mb-act" type="button" data-act="unstar">Clear all stars</button></li>
                <li><hr class="dropdown-divider"></li>
                <li><button class="dropdown-item mb-act" type="button" data-act="restore">Restore demo messages</button></li>
              </ul>
            </div>
            <span class="ms-auto small wdw-muted mb-summary" role="status" aria-live="polite"></span>
          </div>
          <ul class="list-unstyled mb-0 mb-list">
        <li class="mb-row d-flex align-items-center gap-2 gap-md-3 px-3 py-3 mb-unread" data-id="0">
          <input class="form-check-input mb-check mt-0 flex-none" type="checkbox" aria-label="Select message from Google Inc">
          <button type="button" class="btn btn-link mb-star p-0 flex-none is-on" aria-pressed="true" aria-label="Star message from Google Inc"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8-6.2-3.3-6.2 3.3L7 14.2 2 9.3l6.9-1L12 2Z"/></svg></button>
          <span class="mb-from text-truncate d-none d-sm-block flex-none">Google Inc</span>
          <div class="mb-main flex-grow-1 min-w-0">
            <div class="d-sm-none small mb-from">Google Inc</div>
            <div class="text-truncate"><span class="mb-subject">Security alert for your account</span><span class="wdw-muted d-none d-lg-inline"> – We noticed a new sign-in to your Google account on a Mac device.</span></div>
          </div>
          <span class="mb-tag flex-none text-info" title="Project two"><svg width="8" height="8" viewBox="0 0 8 8" aria-hidden="true"><circle cx="4" cy="4" r="4" fill="currentColor"/></svg><span class="visually-hidden">Project two</span></span>
          
          <time class="small wdw-muted flex-none text-end mb-time">07:23 AM</time>
        </li>
        <li class="mb-row d-flex align-items-center gap-2 gap-md-3 px-3 py-3 mb-unread" data-id="1">
          <input class="form-check-input mb-check mt-0 flex-none" type="checkbox" aria-label="Select message from John Doe">
          <button type="button" class="btn btn-link mb-star p-0 flex-none" aria-pressed="false" aria-label="Star message from John Doe"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8-6.2-3.3-6.2 3.3L7 14.2 2 9.3l6.9-1L12 2Z"/></svg></button>
          <span class="mb-from text-truncate d-none d-sm-block flex-none">John Doe</span>
          <div class="mb-main flex-grow-1 min-w-0">
            <div class="d-sm-none small mb-from">John Doe</div>
            <div class="text-truncate"><span class="mb-subject">Hi Bro, how are you?</span><span class="wdw-muted d-none d-lg-inline"> – It has been a while. Are we still on for coffee on Friday?</span></div>
          </div>
          <span class="mb-tag flex-none text-success" title="Family"><svg width="8" height="8" viewBox="0 0 8 8" aria-hidden="true"><circle cx="4" cy="4" r="4" fill="currentColor"/></svg><span class="visually-hidden">Family</span></span>
          <span class="wdw-muted flex-none d-none d-sm-inline"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m21.4 11.1-9.2 9.2a6 6 0 0 1-8.5-8.5l9.2-9.2a4 4 0 0 1 5.7 5.7l-9.2 9.2a2 2 0 0 1-2.8-2.8l8.5-8.5"/></svg><span class="visually-hidden">Has attachment</span></span>
          <time class="small wdw-muted flex-none text-end mb-time">07:03 AM</time>
        </li>
        <li class="mb-row d-flex align-items-center gap-2 gap-md-3 px-3 py-3" data-id="2">
          <input class="form-check-input mb-check mt-0 flex-none" type="checkbox" aria-label="Select message from Manager">
          <button type="button" class="btn btn-link mb-star p-0 flex-none is-on" aria-pressed="true" aria-label="Star message from Manager"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8-6.2-3.3-6.2 3.3L7 14.2 2 9.3l6.9-1L12 2Z"/></svg></button>
          <span class="mb-from text-truncate d-none d-sm-block flex-none">Manager</span>
          <div class="mb-main flex-grow-1 min-w-0">
            <div class="d-sm-none small mb-from">Manager</div>
            <div class="text-truncate"><span class="mb-subject">Quarterly roadmap review</span><span class="wdw-muted d-none d-lg-inline"> – Please review the attached slides before tomorrow's meeting.</span></div>
          </div>
          <span class="mb-tag flex-none text-warning" title="Project one"><svg width="8" height="8" viewBox="0 0 8 8" aria-hidden="true"><circle cx="4" cy="4" r="4" fill="currentColor"/></svg><span class="visually-hidden">Project one</span></span>
          <span class="wdw-muted flex-none d-none d-sm-inline"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m21.4 11.1-9.2 9.2a6 6 0 0 1-8.5-8.5l9.2-9.2a4 4 0 0 1 5.7 5.7l-9.2 9.2a2 2 0 0 1-2.8-2.8l8.5-8.5"/></svg><span class="visually-hidden">Has attachment</span></span>
          <time class="small wdw-muted flex-none text-end mb-time">03:00 AM</time>
        </li>
        <li class="mb-row d-flex align-items-center gap-2 gap-md-3 px-3 py-3" data-id="3">
          <input class="form-check-input mb-check mt-0 flex-none" type="checkbox" aria-label="Select message from Facebook">
          <button type="button" class="btn btn-link mb-star p-0 flex-none" aria-pressed="false" aria-label="Star message from Facebook"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8-6.2-3.3-6.2 3.3L7 14.2 2 9.3l6.9-1L12 2Z"/></svg></button>
          <span class="mb-from text-truncate d-none d-sm-block flex-none">Facebook</span>
          <div class="mb-main flex-grow-1 min-w-0">
            <div class="d-sm-none small mb-from">Facebook</div>
            <div class="text-truncate"><span class="mb-subject">You have 3 new notifications</span><span class="wdw-muted d-none d-lg-inline"> – Maya commented on your photo and 2 others liked your post.</span></div>
          </div>
          
          
          <time class="small wdw-muted flex-none text-end mb-time">22 Feb</time>
        </li>
        <li class="mb-row d-flex align-items-center gap-2 gap-md-3 px-3 py-3" data-id="4">
          <input class="form-check-input mb-check mt-0 flex-none" type="checkbox" aria-label="Select message from Twitter">
          <button type="button" class="btn btn-link mb-star p-0 flex-none" aria-pressed="false" aria-label="Star message from Twitter"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8-6.2-3.3-6.2 3.3L7 14.2 2 9.3l6.9-1L12 2Z"/></svg></button>
          <span class="mb-from text-truncate d-none d-sm-block flex-none">Twitter</span>
          <div class="mb-main flex-grow-1 min-w-0">
            <div class="d-sm-none small mb-from">Twitter</div>
            <div class="text-truncate"><span class="mb-subject">New followers this week</span><span class="wdw-muted d-none d-lg-inline"> – Your profile got 128 new followers. See who they are.</span></div>
          </div>
          <span class="mb-tag flex-none text-danger" title="Friends"><svg width="8" height="8" viewBox="0 0 8 8" aria-hidden="true"><circle cx="4" cy="4" r="4" fill="currentColor"/></svg><span class="visually-hidden">Friends</span></span>
          
          <time class="small wdw-muted flex-none text-end mb-time">21 Feb</time>
        </li>
        <li class="mb-row d-flex align-items-center gap-2 gap-md-3 px-3 py-3" data-id="5">
          <input class="form-check-input mb-check mt-0 flex-none" type="checkbox" aria-label="Select message from Jonaly Smith">
          <button type="button" class="btn btn-link mb-star p-0 flex-none is-on" aria-pressed="true" aria-label="Star message from Jonaly Smith"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8-6.2-3.3-6.2 3.3L7 14.2 2 9.3l6.9-1L12 2Z"/></svg></button>
          <span class="mb-from text-truncate d-none d-sm-block flex-none">Jonaly Smith</span>
          <div class="mb-main flex-grow-1 min-w-0">
            <div class="d-sm-none small mb-from">Jonaly Smith</div>
            <div class="text-truncate"><span class="mb-subject">Invoice #2043 is ready</span><span class="wdw-muted d-none d-lg-inline"> – Your invoice for February is attached. Payment is due in 14 days.</span></div>
          </div>
          <span class="mb-tag flex-none text-primary" title="Web app"><svg width="8" height="8" viewBox="0 0 8 8" aria-hidden="true"><circle cx="4" cy="4" r="4" fill="currentColor"/></svg><span class="visually-hidden">Web app</span></span>
          <span class="wdw-muted flex-none d-none d-sm-inline"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m21.4 11.1-9.2 9.2a6 6 0 0 1-8.5-8.5l9.2-9.2a4 4 0 0 1 5.7 5.7l-9.2 9.2a2 2 0 0 1-2.8-2.8l8.5-8.5"/></svg><span class="visually-hidden">Has attachment</span></span>
          <time class="small wdw-muted flex-none text-end mb-time">19 Feb</time>
        </li>
        <li class="mb-row d-flex align-items-center gap-2 gap-md-3 px-3 py-3" data-id="6">
          <input class="form-check-input mb-check mt-0 flex-none" type="checkbox" aria-label="Select message from Google Inc">
          <button type="button" class="btn btn-link mb-star p-0 flex-none" aria-pressed="false" aria-label="Star message from Google Inc"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8-6.2-3.3-6.2 3.3L7 14.2 2 9.3l6.9-1L12 2Z"/></svg></button>
          <span class="mb-from text-truncate d-none d-sm-block flex-none">Google Inc</span>
          <div class="mb-main flex-grow-1 min-w-0">
            <div class="d-sm-none small mb-from">Google Inc</div>
            <div class="text-truncate"><span class="mb-subject">Your storage is almost full</span><span class="wdw-muted d-none d-lg-inline"> – You have used 92 percent of your storage. Upgrade to keep syncing.</span></div>
          </div>
          
          
          <time class="small wdw-muted flex-none text-end mb-time">18 Feb</time>
        </li>
        <li class="mb-row d-flex align-items-center gap-2 gap-md-3 px-3 py-3" data-id="7">
          <input class="form-check-input mb-check mt-0 flex-none" type="checkbox" aria-label="Select message from John Doe">
          <button type="button" class="btn btn-link mb-star p-0 flex-none is-on" aria-pressed="true" aria-label="Star message from John Doe"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8-6.2-3.3-6.2 3.3L7 14.2 2 9.3l6.9-1L12 2Z"/></svg></button>
          <span class="mb-from text-truncate d-none d-sm-block flex-none">John Doe</span>
          <div class="mb-main flex-grow-1 min-w-0">
            <div class="d-sm-none small mb-from">John Doe</div>
            <div class="text-truncate"><span class="mb-subject">Photos from the weekend</span><span class="wdw-muted d-none d-lg-inline"> – Here are the pictures from the trip. The sunset ones came out great.</span></div>
          </div>
          <span class="mb-tag flex-none text-success" title="Family"><svg width="8" height="8" viewBox="0 0 8 8" aria-hidden="true"><circle cx="4" cy="4" r="4" fill="currentColor"/></svg><span class="visually-hidden">Family</span></span>
          <span class="wdw-muted flex-none d-none d-sm-inline"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m21.4 11.1-9.2 9.2a6 6 0 0 1-8.5-8.5l9.2-9.2a4 4 0 0 1 5.7 5.7l-9.2 9.2a2 2 0 0 1-2.8-2.8l8.5-8.5"/></svg><span class="visually-hidden">Has attachment</span></span>
          <time class="small wdw-muted flex-none text-end mb-time">18 Feb</time>
        </li>
          </ul>
          <p class="text-center wdw-muted py-5 mb-0 mb-none" hidden>Your inbox is empty.</p>
        </div>
      </div>
    </div>
  </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.