Follow Card Toggle
A compact follow card whose button toggles between Follow and Following.
Requires Bootstrap 5. Add the CDN tags below to your page (styles in
<head>, scripts before </body>). The downloaded file already includes them.<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"><script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script><div class="card border-0 shadow-sm text-center" style="max-width:260px">
<div class="card-body">
<div class="rounded-circle mx-auto mb-2 d-grid text-white fw-bold" style="width:64px;height:64px;place-items:center;font-size:22px;background:linear-gradient(135deg,#f857a6,#ff5858)">RW</div>
<h6 class="mb-0">Rachel West</h6>
<p class="text-secondary small mb-3">@rachelwest</p>
<button class="btn btn-outline-primary btn-sm rounded-pill px-4" onclick="this.classList.toggle('btn-primary');this.classList.toggle('text-white');this.classList.toggle('btn-outline-primary');this.textContent=this.textContent==='Follow'?'Following':'Follow'">Follow</button>
</div>
</div>Free to use.This component uses Bootstrap 5 (linked above). Copy any file, or download a ready-to-open .html page with the CDN links already included.