Snippets Profile

Bootstrap 5 Profile Page with Overview and Edit Tabs

A profile page with an avatar card and completion checklist, Overview and Edit profile tabs for the activity feed and account form, and side panels for projects and activity.

Bootstrap 5 No jQuery Oct 2020 2.1K views

<section class="wdw-stage">
  <div class="container" style="max-width:1140px">
    <div class="row g-4 align-items-start">

      <aside class="col-lg-4 col-xl-3">
        <div class="wdw-card overflow-hidden">
          <div class="wdw-aurora profile-cover"></div>
          <div class="px-4 pb-4 text-center">
            <img class="profile-avatar rounded-circle border border-4" src="https://i.pravatar.cc/160?img=47" width="96" height="96" alt="Melisa Doe">
            <h2 class="h5 fw-bold mt-3 mb-0">Melisa Doe</h2>
            <p class="wdw-muted small mb-3">Chief Executive Officer</p>
            <p class="small wdw-muted text-start mb-4">Building calm, useful software with a small team. Coffee, trail running and long documents.</p>
            <div class="text-start">
              <div class="d-flex justify-content-between small fw-semibold mb-1"><span>Profile completion</span><span data-completion-label>60%</span></div>
              <div class="progress mb-3" style="height:.5rem" role="progressbar" aria-label="Profile completion" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" data-completion><div class="progress-bar rounded-pill" style="width:60%"></div></div>
              <ul class="list-unstyled small mb-0 d-grid gap-2" data-checklist>
                <li class="form-check"><input class="form-check-input" type="checkbox" id="c1" checked disabled><label class="form-check-label" for="c1">Update your birthday</label></li>
                <li class="form-check"><input class="form-check-input" type="checkbox" id="c2" checked disabled><label class="form-check-label" for="c2">Update profile picture</label></li>
                <li class="form-check"><input class="form-check-input" type="checkbox" id="c3" checked disabled><label class="form-check-label" for="c3">Verify your email</label></li>
                <li class="form-check"><input class="form-check-input" type="checkbox" id="c4" disabled><label class="form-check-label" for="c4">Confirm your account</label></li>
                <li class="form-check"><input class="form-check-input" type="checkbox" id="c5" disabled><label class="form-check-label" for="c5">Update your address</label></li>
              </ul>
            </div>
          </div>
        </div>
      </aside>

      <main class="col-lg-8 col-xl-6">
        <div class="wdw-card p-3 p-md-4">
          <ul class="nav nav-pills gap-1 mb-4" id="profile-tabs" role="tablist" aria-label="Profile sections">
            <li class="nav-item" role="presentation"><button class="nav-link active rounded-pill" id="tab-overview" data-bs-toggle="pill" data-bs-target="#pane-overview" type="button" role="tab" aria-controls="pane-overview" aria-selected="true">Overview</button></li>
            <li class="nav-item" role="presentation"><button class="nav-link rounded-pill" id="tab-edit" data-bs-toggle="pill" data-bs-target="#pane-edit" type="button" role="tab" aria-controls="pane-edit" aria-selected="false">Edit profile</button></li>
          </ul>
          <div class="tab-content">
            <div class="tab-pane active" id="pane-overview" role="tabpanel" aria-labelledby="tab-overview" tabindex="0">
              <form class="composer mb-4" id="composer">
                <label class="visually-hidden" for="post-text">Share an update</label>
                <textarea class="form-control border-0 bg-transparent" id="post-text" rows="2" placeholder="What's on your mind?"></textarea>
                <div class="d-flex justify-content-between align-items-center px-2 pb-2">
                  <span class="wdw-muted small">Press Post to share with your team</span>
                  <button class="btn btn-primary btn-sm rounded-pill px-3" type="submit">Post</button>
                </div>
              </form>
              <div id="feed" class="d-grid gap-4">
                <article class="d-flex gap-3">
                  <img class="rounded-circle flex-shrink-0" src="https://i.pravatar.cc/80?img=47" width="40" height="40" alt="">
                  <div class="flex-grow-1">
                    <div class="d-flex justify-content-between"><strong>Melisa Doe</strong><span class="wdw-muted small">12 minutes ago</span></div>
                    <p class="mb-2">Shipped the new onboarding flow today. Huge thanks to everyone who tested it over the weekend.</p>
                    <div class="d-flex gap-1 small fw-semibold">
                      <button type="button" class="btn btn-link btn-sm px-2 text-decoration-none act like" aria-pressed="false">Like <span>(12)</span></button>
                      <button type="button" class="btn btn-link btn-sm px-2 text-decoration-none act" data-reply>Reply</button>
                    </div>
                    <form class="reply-form d-none gap-2 mt-2" data-reply-form>
                      <label class="visually-hidden">Write a reply</label>
                      <input class="form-control form-control-sm" placeholder="Write a reply..." required>
                      <button class="btn btn-primary btn-sm rounded-pill px-3" type="submit">Send</button>
                    </form>
                    <div class="reply d-flex gap-3 mt-3 p-3 rounded-4">
                      <img class="rounded-circle flex-shrink-0" src="https://i.pravatar.cc/80?img=12" width="36" height="36" alt="">
                      <div>
                        <div class="d-flex gap-2 align-items-baseline"><strong class="small">Ioana Doe</strong><span class="wdw-muted small">4 minutes ago</span></div>
                        <p class="small mb-0">Great work, the empty states look lovely.</p>
                      </div>
                    </div>
                  </div>
                </article>
                <article class="d-flex gap-3">
                  <img class="rounded-circle flex-shrink-0" src="https://i.pravatar.cc/80?img=33" width="40" height="40" alt="">
                  <div class="flex-grow-1">
                    <div class="d-flex justify-content-between"><strong>Simon Carter</strong><span class="wdw-muted small">1 hour ago</span></div>
                    <p class="mb-2">Reminder: design review moves to Thursday at 10:00.</p>
                    <div class="d-flex gap-1 small fw-semibold">
                      <button type="button" class="btn btn-link btn-sm px-2 text-decoration-none act like" aria-pressed="false">Like <span>(3)</span></button>
                      <button type="button" class="btn btn-link btn-sm px-2 text-decoration-none act" data-reply>Reply</button>
                    </div>
                    <form class="reply-form d-none gap-2 mt-2" data-reply-form>
                      <label class="visually-hidden">Write a reply</label>
                      <input class="form-control form-control-sm" placeholder="Write a reply..." required>
                      <button class="btn btn-primary btn-sm rounded-pill px-3" type="submit">Send</button>
                    </form>
                  </div>
                </article>
              </div>
            </div>

            <div class="tab-pane" id="pane-edit" role="tabpanel" aria-labelledby="tab-edit" tabindex="0">
              <form id="edit-form" class="row g-3" novalidate>
                <div class="col-sm-6"><div class="form-floating"><input class="form-control" id="f-first" value="Melisa" placeholder="First name" required aria-describedby="f-first-err"><label for="f-first">First name</label><div class="invalid-feedback" id="f-first-err">First name is required.</div></div></div>
                <div class="col-sm-6"><div class="form-floating"><input class="form-control" id="f-last" value="Doe" placeholder="Last name" required aria-describedby="f-last-err"><label for="f-last">Last name</label><div class="invalid-feedback" id="f-last-err">Last name is required.</div></div></div>
                <div class="col-12"><div class="form-floating"><input class="form-control" id="f-title" value="Chief Executive Officer" placeholder="Job title"><label for="f-title">Job title</label></div></div>
                <div class="col-12"><div class="form-floating"><input type="email" class="form-control" id="f-email" value="[email protected]" placeholder="Email" required aria-describedby="f-email-err"><label for="f-email">Email</label><div class="invalid-feedback" id="f-email-err">Enter a valid email address.</div></div></div>
                <div class="col-12"><label class="form-label small fw-semibold" for="f-bio">Bio</label><textarea class="form-control" id="f-bio" rows="3">Building calm, useful software with a small team.</textarea></div>
                <div class="col-12 d-flex gap-2 justify-content-end align-items-center">
                  <span class="small text-success-emphasis me-auto" role="status" data-saved></span>
                  <button type="button" class="btn btn-outline-secondary cancel-btn rounded-pill" id="cancel-edit">Cancel</button>
                  <button type="submit" class="btn btn-primary rounded-pill">Save changes</button>
                </div>
              </form>
            </div>
          </div>
        </div>
      </main>

      <aside class="col-12 col-xl-3">
        <div class="wdw-card p-4 mb-4">
          <h3 class="h6 fw-bold mb-3">Projects</h3>
          <ul class="list-unstyled d-grid gap-3 mb-0">
            <li class="d-flex gap-3"><span class="dot"></span><div><div class="fw-semibold">Epona template</div><div class="wdw-muted small">Landing page kit, 80% done</div></div></li>
            <li class="d-flex gap-3"><span class="dot"></span><div><div class="fw-semibold">Atropos dashboard</div><div class="wdw-muted small">In design review</div></div></li>
            <li class="d-flex gap-3"><span class="dot"></span><div><div class="fw-semibold">Isisone mobile</div><div class="wdw-muted small">Waiting on copy</div></div></li>
          </ul>
        </div>
        <div class="wdw-card p-4">
          <h3 class="h6 fw-bold mb-3">Activity</h3>
          <ul class="list-unstyled d-grid gap-3 mb-0">
            <li class="d-flex gap-3"><span class="date"><small>Jun</small>29</span><div class="small"><strong>Release notes drafted</strong><div class="wdw-muted">Version 2.4 changelog</div></div></li>
            <li class="d-flex gap-3"><span class="date"><small>Jun</small>24</span><div class="small"><strong>Team offsite booked</strong><div class="wdw-muted">Lisbon, September</div></div></li>
          </ul>
        </div>
      </aside>
    </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.