Snippets Grid

Bootstrap 5 Password Vault Dashboard with Grid and List View

A password-vault screen with an icon rail, search bar and account header, showing saved logins as cards that switch between grid and list and filter as you type.

Bootstrap 5 No jQuery Jan 2020 2K views

<section class="wdw-stage">
  <div class="container" style="max-width:1080px">
    <div class="wdw-card overflow-hidden d-flex vt">
      <nav class="vt-railbar wdw-aurora d-flex flex-column align-items-center gap-2 py-3" aria-label="Vault sections"><a class="vt-rail active" href="#" aria-label="Home" aria-current="page"><svg width="20" height="20" 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 11 9-8 9 8v10a1 1 0 0 1-1 1h-5v-7H9v7H4a1 1 0 0 1-1-1z"/></svg></a><a class="vt-rail" href="#" aria-label="Passwords"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="4" y="11" width="16" height="10" rx="2"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></svg></a><a class="vt-rail" href="#" aria-label="Notes"><svg width="20" height="20" 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 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"/><path d="M14 3v6h6"/></svg></a><a class="vt-rail" href="#" aria-label="Payments"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="5" width="20" height="14" rx="2"/><path d="M2 10h20"/></svg></a><a class="vt-rail" href="#" aria-label="Security"><svg width="20" height="20" 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 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg></a></nav>
      <div class="flex-grow-1 min-w-0">
        <header class="d-flex align-items-center gap-3 p-3 border-bottom">
          <div class="position-relative flex-grow-1" style="max-width:420px">
            <span class="position-absolute top-50 translate-middle-y ms-3 text-body-secondary" aria-hidden="true"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></svg></span>
            <input type="search" class="form-control rounded-pill ps-5 bg-body-tertiary border-0" id="vtSearch" placeholder="Search my vault" aria-label="Search my vault">
          </div>
          <div class="d-none d-sm-flex align-items-center gap-2 ms-auto">
            <img class="rounded-circle" src="https://i.pravatar.cc/72?img=5" width="36" height="36" alt="">
            <div class="lh-sm small"><div class="fw-semibold">[email protected]</div><div class="text-body-secondary">Premium user</div></div>
          </div>
        </header>
        <div class="p-3 p-md-4">
          <div class="d-flex align-items-center justify-content-between mb-3">
            <h1 class="h4 wdw-heading mb-0">All items <span class="badge rounded-pill bg-primary-subtle text-primary-emphasis align-middle ms-1" id="vtCount">12</span></h1>
            <div class="btn-group" role="group" aria-label="Layout">
              <input type="radio" class="btn-check" name="vtView" id="vtGrid" autocomplete="off" checked>
              <label class="btn btn-outline-primary rounded-start-pill px-3" for="vtGrid" aria-label="Grid view"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg></label>
              <input type="radio" class="btn-check" name="vtView" id="vtList" autocomplete="off">
              <label class="btn btn-outline-primary rounded-end-pill px-3" for="vtList" aria-label="List view"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01"/></svg></label>
            </div>
          </div>
          <ul class="list-unstyled vt-grid mb-0" id="vtItems">
          <li class="vt-item" data-name="amazon"><div class="vt-card d-flex align-items-center gap-3 p-3 position-relative"><a href="#" class="vt-main d-flex align-items-center gap-3 text-decoration-none min-w-0 flex-grow-1 stretched-link"><span class="wdw-icon vt-tile"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="9" cy="20" r="1.5"/><circle cx="18" cy="20" r="1.5"/><path d="M2 3h3l2.7 12.4a1 1 0 0 0 1 .8h8.8a1 1 0 0 0 1-.8L20 8H6"/></svg></span><span class="min-w-0 vt-text"><span class="d-block fw-semibold text-body-emphasis text-truncate">Amazon</span><span class="d-block small text-body-secondary text-truncate vt-sub">[email protected]</span></span></a><span class="vt-user small text-body-secondary d-none text-truncate">[email protected]</span><span class="badge rounded-pill bg-body text-body-secondary border vt-cat d-none">Shopping</span><button type="button" class="btn btn-sm btn-light rounded-circle vt-copy position-relative" style="z-index:2;width:36px;padding:0" aria-label="Copy password for Amazon"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V6a2 2 0 0 1 2-2h9"/></svg></button></div></li>
          <li class="vt-item" data-name="apple id"><div class="vt-card d-flex align-items-center gap-3 p-3 position-relative"><a href="#" class="vt-main d-flex align-items-center gap-3 text-decoration-none min-w-0 flex-grow-1 stretched-link"><span class="wdw-icon vt-tile"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="6" y="2" width="12" height="20" rx="3"/><path d="M11 18h2"/></svg></span><span class="min-w-0 vt-text"><span class="d-block fw-semibold text-body-emphasis text-truncate">Apple ID</span><span class="d-block small text-body-secondary text-truncate vt-sub">[email protected]</span></span></a><span class="vt-user small text-body-secondary d-none text-truncate">[email protected]</span><span class="badge rounded-pill bg-body text-body-secondary border vt-cat d-none">Account</span><button type="button" class="btn btn-sm btn-light rounded-circle vt-copy position-relative" style="z-index:2;width:36px;padding:0" aria-label="Copy password for Apple ID"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V6a2 2 0 0 1 2-2h9"/></svg></button></div></li>
          <li class="vt-item" data-name="bank account"><div class="vt-card d-flex align-items-center gap-3 p-3 position-relative"><a href="#" class="vt-main d-flex align-items-center gap-3 text-decoration-none min-w-0 flex-grow-1 stretched-link"><span class="wdw-icon vt-tile"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 10 12 4l9 6"/><path d="M5 10v8M10 10v8M14 10v8M19 10v8M3 21h18"/></svg></span><span class="min-w-0 vt-text"><span class="d-block fw-semibold text-body-emphasis text-truncate">Bank Account</span><span class="d-block small text-body-secondary text-truncate vt-sub">Ending in 1234</span></span></a><span class="vt-user small text-body-secondary d-none text-truncate">Ending in 1234</span><span class="badge rounded-pill bg-body text-body-secondary border vt-cat d-none">Finance</span><button type="button" class="btn btn-sm btn-light rounded-circle vt-copy position-relative" style="z-index:2;width:36px;padding:0" aria-label="Copy password for Bank Account"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V6a2 2 0 0 1 2-2h9"/></svg></button></div></li>
          <li class="vt-item" data-name="behance"><div class="vt-card d-flex align-items-center gap-3 p-3 position-relative"><a href="#" class="vt-main d-flex align-items-center gap-3 text-decoration-none min-w-0 flex-grow-1 stretched-link"><span class="wdw-icon vt-tile"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1"/><path d="M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1"/></svg></span><span class="min-w-0 vt-text"><span class="d-block fw-semibold text-body-emphasis text-truncate">Behance</span><span class="d-block small text-body-secondary text-truncate vt-sub">[email protected]</span></span></a><span class="vt-user small text-body-secondary d-none text-truncate">[email protected]</span><span class="badge rounded-pill bg-body text-body-secondary border vt-cat d-none">Social</span><button type="button" class="btn btn-sm btn-light rounded-circle vt-copy position-relative" style="z-index:2;width:36px;padding:0" aria-label="Copy password for Behance"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V6a2 2 0 0 1 2-2h9"/></svg></button></div></li>
          <li class="vt-item" data-name="codepen"><div class="vt-card d-flex align-items-center gap-3 p-3 position-relative"><a href="#" class="vt-main d-flex align-items-center gap-3 text-decoration-none min-w-0 flex-grow-1 stretched-link"><span class="wdw-icon vt-tile"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m8 8-5 4 5 4M16 8l5 4-5 4M14 5l-4 14"/></svg></span><span class="min-w-0 vt-text"><span class="d-block fw-semibold text-body-emphasis text-truncate">CodePen</span><span class="d-block small text-body-secondary text-truncate vt-sub">[email protected]</span></span></a><span class="vt-user small text-body-secondary d-none text-truncate">[email protected]</span><span class="badge rounded-pill bg-body text-body-secondary border vt-cat d-none">Dev</span><button type="button" class="btn btn-sm btn-light rounded-circle vt-copy position-relative" style="z-index:2;width:36px;padding:0" aria-label="Copy password for CodePen"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V6a2 2 0 0 1 2-2h9"/></svg></button></div></li>
          <li class="vt-item" data-name="coinbase"><div class="vt-card d-flex align-items-center gap-3 p-3 position-relative"><a href="#" class="vt-main d-flex align-items-center gap-3 text-decoration-none min-w-0 flex-grow-1 stretched-link"><span class="wdw-icon vt-tile"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 7V5a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15v12H5a2 2 0 0 1-2-2V6"/><circle cx="16.5" cy="14" r="1"/></svg></span><span class="min-w-0 vt-text"><span class="d-block fw-semibold text-body-emphasis text-truncate">Coinbase</span><span class="d-block small text-body-secondary text-truncate vt-sub">[email protected]</span></span></a><span class="vt-user small text-body-secondary d-none text-truncate">[email protected]</span><span class="badge rounded-pill bg-body text-body-secondary border vt-cat d-none">Finance</span><button type="button" class="btn btn-sm btn-light rounded-circle vt-copy position-relative" style="z-index:2;width:36px;padding:0" aria-label="Copy password for Coinbase"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V6a2 2 0 0 1 2-2h9"/></svg></button></div></li>
          <li class="vt-item" data-name="credit card"><div class="vt-card d-flex align-items-center gap-3 p-3 position-relative"><a href="#" class="vt-main d-flex align-items-center gap-3 text-decoration-none min-w-0 flex-grow-1 stretched-link"><span class="wdw-icon vt-tile"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="5" width="20" height="14" rx="2"/><path d="M2 10h20M6 15h3"/></svg></span><span class="min-w-0 vt-text"><span class="d-block fw-semibold text-body-emphasis text-truncate">Credit Card</span><span class="d-block small text-body-secondary text-truncate vt-sub">Ending in 1234</span></span></a><span class="vt-user small text-body-secondary d-none text-truncate">Ending in 1234</span><span class="badge rounded-pill bg-body text-body-secondary border vt-cat d-none">Finance</span><button type="button" class="btn btn-sm btn-light rounded-circle vt-copy position-relative" style="z-index:2;width:36px;padding:0" aria-label="Copy password for Credit Card"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V6a2 2 0 0 1 2-2h9"/></svg></button></div></li>
          <li class="vt-item" data-name="discord"><div class="vt-card d-flex align-items-center gap-3 p-3 position-relative"><a href="#" class="vt-main d-flex align-items-center gap-3 text-decoration-none min-w-0 flex-grow-1 stretched-link"><span class="wdw-icon vt-tile"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 12a8 8 0 0 1-11.6 7.1L3 21l1.9-5.4A8 8 0 1 1 21 12z"/></svg></span><span class="min-w-0 vt-text"><span class="d-block fw-semibold text-body-emphasis text-truncate">Discord</span><span class="d-block small text-body-secondary text-truncate vt-sub">[email protected]</span></span></a><span class="vt-user small text-body-secondary d-none text-truncate">[email protected]</span><span class="badge rounded-pill bg-body text-body-secondary border vt-cat d-none">Social</span><button type="button" class="btn btn-sm btn-light rounded-circle vt-copy position-relative" style="z-index:2;width:36px;padding:0" aria-label="Copy password for Discord"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V6a2 2 0 0 1 2-2h9"/></svg></button></div></li>
          <li class="vt-item" data-name="dropbox"><div class="vt-card d-flex align-items-center gap-3 p-3 position-relative"><a href="#" class="vt-main d-flex align-items-center gap-3 text-decoration-none min-w-0 flex-grow-1 stretched-link"><span class="wdw-icon vt-tile"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m21 8-9-5-9 5 9 5z"/><path d="M3 8v8l9 5 9-5V8M12 13v8"/></svg></span><span class="min-w-0 vt-text"><span class="d-block fw-semibold text-body-emphasis text-truncate">Dropbox</span><span class="d-block small text-body-secondary text-truncate vt-sub">[email protected]</span></span></a><span class="vt-user small text-body-secondary d-none text-truncate">[email protected]</span><span class="badge rounded-pill bg-body text-body-secondary border vt-cat d-none">Storage</span><button type="button" class="btn btn-sm btn-light rounded-circle vt-copy position-relative" style="z-index:2;width:36px;padding:0" aria-label="Copy password for Dropbox"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V6a2 2 0 0 1 2-2h9"/></svg></button></div></li>
          <li class="vt-item" data-name="gmail"><div class="vt-card d-flex align-items-center gap-3 p-3 position-relative"><a href="#" class="vt-main d-flex align-items-center gap-3 text-decoration-none min-w-0 flex-grow-1 stretched-link"><span class="wdw-icon vt-tile"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="m3 7 9 6 9-6"/></svg></span><span class="min-w-0 vt-text"><span class="d-block fw-semibold text-body-emphasis text-truncate">Gmail</span><span class="d-block small text-body-secondary text-truncate vt-sub">[email protected]</span></span></a><span class="vt-user small text-body-secondary d-none text-truncate">[email protected]</span><span class="badge rounded-pill bg-body text-body-secondary border vt-cat d-none">Account</span><button type="button" class="btn btn-sm btn-light rounded-circle vt-copy position-relative" style="z-index:2;width:36px;padding:0" aria-label="Copy password for Gmail"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V6a2 2 0 0 1 2-2h9"/></svg></button></div></li>
          <li class="vt-item" data-name="icloud"><div class="vt-card d-flex align-items-center gap-3 p-3 position-relative"><a href="#" class="vt-main d-flex align-items-center gap-3 text-decoration-none min-w-0 flex-grow-1 stretched-link"><span class="wdw-icon vt-tile"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M7 18a4.5 4.5 0 0 1-.6-9A6 6 0 0 1 18 9.5a4 4 0 0 1-.5 8.5z"/></svg></span><span class="min-w-0 vt-text"><span class="d-block fw-semibold text-body-emphasis text-truncate">iCloud</span><span class="d-block small text-body-secondary text-truncate vt-sub">[email protected]</span></span></a><span class="vt-user small text-body-secondary d-none text-truncate">[email protected]</span><span class="badge rounded-pill bg-body text-body-secondary border vt-cat d-none">Storage</span><button type="button" class="btn btn-sm btn-light rounded-circle vt-copy position-relative" style="z-index:2;width:36px;padding:0" aria-label="Copy password for iCloud"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V6a2 2 0 0 1 2-2h9"/></svg></button></div></li>
          <li class="vt-item" data-name="zoom"><div class="vt-card d-flex align-items-center gap-3 p-3 position-relative"><a href="#" class="vt-main d-flex align-items-center gap-3 text-decoration-none min-w-0 flex-grow-1 stretched-link"><span class="wdw-icon vt-tile"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="6" width="13" height="12" rx="2"/><path d="m16 10 5-3v10l-5-3"/></svg></span><span class="min-w-0 vt-text"><span class="d-block fw-semibold text-body-emphasis text-truncate">Zoom</span><span class="d-block small text-body-secondary text-truncate vt-sub">[email protected]</span></span></a><span class="vt-user small text-body-secondary d-none text-truncate">[email protected]</span><span class="badge rounded-pill bg-body text-body-secondary border vt-cat d-none">Work</span><button type="button" class="btn btn-sm btn-light rounded-circle vt-copy position-relative" style="z-index:2;width:36px;padding:0" aria-label="Copy password for Zoom"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V6a2 2 0 0 1 2-2h9"/></svg></button></div></li>
          </ul>
          <div class="d-flex justify-content-end mt-3"><button type="button" class="btn btn-primary rounded-circle p-0" style="width:48px" aria-label="Add item"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg></button></div>
          <p class="text-center text-body-secondary py-4 mb-0 d-none" id="vtEmpty">No items match your search.</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.