Snippets Card

Bootstrap 5 Crypto Donation Card with Copy Address

A crypto donation profile card with coin tabs, a copyable deposit address and a row of market stats.

Bootstrap 5 No jQuery Jan 2020 2.6K views

<section class="wdw-stage">
  <div class="container" style="max-width: 520px">
    <article class="wdw-card overflow-hidden">
      <div class="wdw-aurora cd-hero"></div>
      <div class="px-4 pb-4">
        <div class="d-flex align-items-end justify-content-between cd-head">
          <img class="cd-avatar" src="https://i.pravatar.cc/200?img=12" alt="Rainner Lins" width="88" height="88">
          <a href="#" class="btn btn-sm btn-outline-primary rounded-pill mb-1">Website</a>
        </div>
        <h2 class="h5 wdw-heading mt-3 mb-0">Rainner Lins</h2>
        <p class="small wdw-muted mb-0">Full-stack developer and open source maintainer</p>

        <ul class="nav nav-pills nav-fill gap-1 my-4" id="cdTabs" role="tablist" aria-label="Choose a coin">
          <li class="nav-item" role="presentation"><button class="nav-link active rounded-pill" data-coin="btc" role="tab" aria-selected="true" type="button">BTC</button></li>
          <li class="nav-item" role="presentation"><button class="nav-link rounded-pill" data-coin="eth" role="tab" aria-selected="false" type="button">ETH</button></li>
          <li class="nav-item" role="presentation"><button class="nav-link rounded-pill" data-coin="ltc" role="tab" aria-selected="false" type="button">LTC</button></li>
          <li class="nav-item" role="presentation"><button class="nav-link rounded-pill" data-coin="nano" role="tab" aria-selected="false" type="button">NANO</button></li>
        </ul>

        <div role="tabpanel" aria-live="polite">
          <div class="d-flex align-items-center gap-3 mb-2">
            <span class="wdw-icon cd-glyph" id="cdGlyph">B</span>
            <h3 class="h5 wdw-heading mb-0" id="cdTitle">Donate Bitcoin</h3>
          </div>
          <p class="wdw-muted small mb-4" id="cdNote">Send only Bitcoin (BTC) to this address. Sending any other coin or token may result in the loss of your donation. Thank you!</p>
          <label class="form-label small fw-semibold" for="cdAddr">Deposit address</label>
          <div class="input-group mb-4">
            <input type="text" id="cdAddr" class="form-control font-monospace small" readonly value="13R8NFPs7oFjDof3pQ832g1RgEkkkFqBAN">
            <button class="btn btn-primary" type="button" id="cdCopy">Copy</button>
          </div>
          <div class="row text-center g-2">
            <div class="col-4"><div class="rounded-3 bg-body-tertiary p-2"><div class="wdw-eyebrow text-body-secondary">Price</div><div class="fw-bold" id="cdPrice">$67,420</div></div></div>
            <div class="col-4"><div class="rounded-3 bg-body-tertiary p-2"><div class="wdw-eyebrow text-body-secondary">Market cap</div><div class="fw-bold" id="cdCap">$1.33T</div></div></div>
            <div class="col-4"><div class="rounded-3 bg-body-tertiary p-2"><div class="wdw-eyebrow text-body-secondary">Supply</div><div class="fw-bold" id="cdSupply">19.7M</div></div></div>
          </div>
        </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.