Snippets Layout

Bootstrap 5 User Profile Card with Follow Button

A user profile card with cover photo, avatar, bio, follow and message buttons, and post, follower and following counts.

Bootstrap 5 No jQuery Jan 2020 2.2K views

<section class="wdw-stage">
  <div class="container" style="max-width: 460px">
    <article class="wdw-card overflow-hidden pf-card">
      <div class="pf-cover">
        <img src="https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1200&q=80" alt="" class="w-100 h-100 object-fit-cover">
      </div>
      <div class="px-4 px-md-5 pb-4 pb-md-5 text-center">
        <img src="https://i.pravatar.cc/200?img=12" alt="Portrait of Jose Pino" width="96" height="96" class="pf-avatar rounded-circle">
        <h2 class="wdw-heading h4 mt-3 mb-0">Jose Pino</h2>
        <a href="#" class="small link-primary link-underline-opacity-0 link-underline-opacity-100-hover fw-semibold">@jofpin</a>
        <p class="wdw-muted mt-3 mb-4">Front-end developer and security researcher. I love building small, careful things for the internet.</p>

        <div class="d-flex gap-2 justify-content-center mb-4">
          <button type="button" class="btn btn-primary rounded-pill px-4 pf-follow" aria-pressed="false">Follow</button>
          <button type="button" class="btn border text-body-emphasis rounded-pill px-4">Message</button>
        </div>

        <dl class="row row-cols-3 g-2 text-center mb-0">
          <div class="col"><div class="bg-body-tertiary rounded-4 py-3"><dd class="h5 fw-bold mb-0 pf-count" data-base="718">3,390</dd><dt class="small fw-normal wdw-muted">Posts</dt></div></div>
          <div class="col"><div class="bg-body-tertiary rounded-4 py-3"><dd class="h5 fw-bold mb-0 pf-followers" data-base="718">718</dd><dt class="small fw-normal wdw-muted">Followers</dt></div></div>
          <div class="col"><div class="bg-body-tertiary rounded-4 py-3"><dd class="h5 fw-bold mb-0">239</dd><dt class="small fw-normal wdw-muted">Following</dt></div></div>
        </dl>
      </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.