Snippets Buttons

Bootstrap 5 User Profile Card with Follow Button

A profile card with avatar, bio, a Follow button that toggles to Following, and post, follower and like stats.

Bootstrap 5 No jQuery Jun 2020 2.5K views

<section class="wdw-stage">
  <div class="container" style="max-width: 400px;">
    <article class="wdw-card overflow-hidden text-center" id="profile">
      <div class="wdw-aurora" style="height: 110px;"></div>
      <div class="px-4 pb-4 position-relative" style="margin-top: -52px;">
        <img src="https://i.pravatar.cc/200?img=32" width="104" height="104" alt="Sam Disanjo" class="rounded-circle wdw-ring shadow-sm mb-3">
        <h2 class="wdw-heading h4 mb-0">Sam Disanjo</h2>
        <p class="text-primary fw-semibold small mb-3">Social activist</p>
        <p class="wdw-muted mb-4 px-2">Asking better questions about business content, one thread at a time.</p>
        <div class="d-flex gap-2 justify-content-center mb-4">
          <button type="button" class="btn btn-primary rounded-pill px-4" id="follow-btn" aria-pressed="false"><svg class="follow-icon" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg>Follow</button>
          <button type="button" class="btn btn-outline-primary rounded-pill px-4"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" 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>Message</button>
        </div>
        <div class="row g-0 border-top pt-3">
          <div class="col-4"><div class="fw-bold fs-5 text-body-emphasis">4,354</div><div class="small wdw-muted">Posts</div></div>
          <div class="col-4 border-start border-end"><div class="fw-bold fs-5 text-body-emphasis" id="follow-count" aria-live="polite" data-base="455000">455K</div><div class="small wdw-muted">Followers</div></div>
          <div class="col-4"><div class="fw-bold fs-5 text-body-emphasis">34K</div><div class="small wdw-muted">Likes</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.