Bootstrap 5 Profile Cards with Hover Bio Reveal
A row of team profile cards that reveal a short bio with a smooth expand on hover, or on tap for touch devices.
<section class="wdw-stage">
<div class="container" style="max-width:1000px">
<div class="text-center mb-5"><span class="wdw-eyebrow">Our team</span><h1 class="wdw-heading h2 mt-1 mb-1">Meet the people behind the work</h1><p class="wdw-muted mb-0">Hover, focus or tap a portrait to read more.</p></div>
<div class="row g-4 profiles">
<div class="col-md-4">
<article class="profile">
<img src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=640&h=800&fit=crop&q=75" alt="Portrait of Amara Okafor" width="640" height="800" loading="lazy">
<div class="profile-over">
<div class="d-flex align-items-end justify-content-between gap-2">
<div><h2 class="h5 fw-bold mb-0 text-white">Amara Okafor</h2><p class="small mb-0 profile-role">Product Designer</p></div>
<button type="button" class="profile-toggle" aria-expanded="false" aria-controls="bio-1" aria-label="About Amara Okafor"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg></button>
</div>
<div class="profile-bio" id="bio-1" inert>
<div class="profile-bio-in">
<p class="small mb-3 pt-3">Amara leads design systems for a team of twelve and writes about accessible interfaces, motion and the craft of small details.</p>
<div class="d-flex flex-wrap align-items-center gap-2">
<span class="badge rounded-pill profile-chip">Design systems</span><span class="badge rounded-pill profile-chip">Motion</span>
<span class="ms-auto d-flex gap-2"><a class="profile-social" href="#" aria-label="Amara on LinkedIn"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M4.98 3.5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5zM3 9.75h4v11H3zM9.5 9.75h3.8v1.5h.1c.5-1 1.800-1.800 3.700-1.800 4 0 4.700 2.600 4.700 6v5.300h-4v-4.700c0-1.100 0-2.600-1.600-2.600s-1.800 1.200-1.800 2.500v4.800h-4z"/></svg></a><a class="profile-social" href="#" aria-label="Email Amara"><svg width="16" height="16" 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></a></span>
</div>
</div>
</div>
</div>
</article>
</div>
<div class="col-md-4">
<article class="profile">
<img src="https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=640&h=800&fit=crop&q=75" alt="Portrait of Daniel Reyes" width="640" height="800" loading="lazy">
<div class="profile-over">
<div class="d-flex align-items-end justify-content-between gap-2">
<div><h2 class="h5 fw-bold mb-0 text-white">Daniel Reyes</h2><p class="small mb-0 profile-role">Engineering Lead</p></div>
<button type="button" class="profile-toggle" aria-expanded="false" aria-controls="bio-2" aria-label="About Daniel Reyes"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg></button>
</div>
<div class="profile-bio" id="bio-2" inert>
<div class="profile-bio-in">
<p class="small mb-3 pt-3">Daniel builds fast, dependable web platforms and mentors junior developers. A regular conference speaker on front-end performance.</p>
<div class="d-flex flex-wrap align-items-center gap-2">
<span class="badge rounded-pill profile-chip">Performance</span><span class="badge rounded-pill profile-chip">Mentoring</span>
<span class="ms-auto d-flex gap-2"><a class="profile-social" href="#" aria-label="Daniel on LinkedIn"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M4.98 3.5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5zM3 9.75h4v11H3zM9.5 9.75h3.8v1.5h.1c.5-1 1.800-1.800 3.700-1.800 4 0 4.700 2.600 4.700 6v5.300h-4v-4.700c0-1.100 0-2.600-1.600-2.600s-1.800 1.200-1.800 2.500v4.800h-4z"/></svg></a><a class="profile-social" href="#" aria-label="Email Daniel"><svg width="16" height="16" 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></a></span>
</div>
</div>
</div>
</div>
</article>
</div>
<div class="col-md-4">
<article class="profile">
<img src="https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=640&h=800&fit=crop&q=75" alt="Portrait of Elena Novak" width="640" height="800" loading="lazy">
<div class="profile-over">
<div class="d-flex align-items-end justify-content-between gap-2">
<div><h2 class="h5 fw-bold mb-0 text-white">Elena Novak</h2><p class="small mb-0 profile-role">Brand Strategist</p></div>
<button type="button" class="profile-toggle" aria-expanded="false" aria-controls="bio-3" aria-label="About Elena Novak"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg></button>
</div>
<div class="profile-bio" id="bio-3" inert>
<div class="profile-bio-in">
<p class="small mb-3 pt-3">Elena helps young companies find their voice, turning scattered ideas into clear, memorable brands that people trust.</p>
<div class="d-flex flex-wrap align-items-center gap-2">
<span class="badge rounded-pill profile-chip">Brand voice</span><span class="badge rounded-pill profile-chip">Naming</span>
<span class="ms-auto d-flex gap-2"><a class="profile-social" href="#" aria-label="Elena on LinkedIn"><svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M4.98 3.5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5zM3 9.75h4v11H3zM9.5 9.75h3.8v1.5h.1c.5-1 1.800-1.800 3.700-1.800 4 0 4.700 2.600 4.700 6v5.300h-4v-4.700c0-1.100 0-2.600-1.600-2.600s-1.800 1.200-1.800 2.500v4.800h-4z"/></svg></a><a class="profile-social" href="#" aria-label="Email Elena"><svg width="16" height="16" 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></a></span>
</div>
</div>
</div>
</div>
</article>
</div>
</div>
</div>
</section>
/* Web Designer Wall library style — shared base for every Bootstrap 5 snippet.
Indigo accent, Plus Jakarta Sans, soft cards, pill buttons. Works in light and dark. */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");
:root,
[data-bs-theme="light"] {
--wdw-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
--bs-body-font-family: var(--wdw-font);
--bs-primary: #4f46e5;
--bs-primary-rgb: 79, 70, 229;
--bs-primary-text-emphasis: #3730a3;
--bs-primary-bg-subtle: #eef2ff;
--bs-primary-border-subtle: #c7d2fe;
--bs-link-color: #4f46e5;
--bs-link-color-rgb: 79, 70, 229;
--bs-link-hover-color: #4338ca;
--bs-link-hover-color-rgb: 67, 56, 202;
--bs-focus-ring-color: rgba(79, 70, 229, 0.25);
--bs-border-radius: 0.75rem;
--bs-border-radius-lg: 1rem;
--bs-border-radius-xl: 1.25rem;
--wdw-radius-card: 1.25rem;
--wdw-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 16px 40px -16px rgba(16, 24, 40, 0.22);
--wdw-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 12px -4px rgba(16, 24, 40, 0.12);
--wdw-stage: #f5f6fb;
}
[data-bs-theme="dark"] {
--bs-primary: #818cf8;
--bs-primary-rgb: 129, 140, 248;
--bs-primary-text-emphasis: #c7d2fe;
--bs-primary-bg-subtle: rgba(129, 140, 248, 0.14);
--bs-primary-border-subtle: rgba(129, 140, 248, 0.35);
--bs-link-color: #a5b4fc;
--bs-link-color-rgb: 165, 180, 252;
--bs-link-hover-color: #c7d2fe;
--bs-link-hover-color-rgb: 199, 210, 254;
--bs-focus-ring-color: rgba(129, 140, 248, 0.35);
--wdw-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -16px rgba(0, 0, 0, 0.7);
--wdw-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px -4px rgba(0, 0, 0, 0.5);
--wdw-stage: #0f1117;
}
body { font-family: var(--wdw-font); -webkit-font-smoothing: antialiased; }
/* Bootstrap compiles its blue into these components; point them at the accent. */
.btn-primary {
--bs-btn-bg: var(--bs-primary); --bs-btn-border-color: var(--bs-primary);
--bs-btn-hover-bg: #4338ca; --bs-btn-hover-border-color: #4338ca;
--bs-btn-active-bg: #3730a3; --bs-btn-active-border-color: #3730a3;
--bs-btn-disabled-bg: var(--bs-primary); --bs-btn-disabled-border-color: var(--bs-primary);
--bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}
[data-bs-theme="dark"] .btn-primary { --bs-btn-color: #0f1117; --bs-btn-hover-bg: #a5b4fc; --bs-btn-hover-border-color: #a5b4fc; --bs-btn-hover-color: #0f1117; --bs-btn-active-color: #0f1117; }
.btn-outline-primary {
--bs-btn-color: var(--bs-primary); --bs-btn-border-color: var(--bs-primary);
--bs-btn-hover-bg: var(--bs-primary); --bs-btn-hover-border-color: var(--bs-primary);
--bs-btn-active-bg: var(--bs-primary); --bs-btn-active-border-color: var(--bs-primary);
--bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}
.btn { --bs-btn-font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.btn-sm { min-height: 36px; }
.form-control, .form-select { min-height: 44px; border-radius: .75rem; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: rgba(var(--bs-primary-rgb), .6); box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.form-check-input:checked { background-color: var(--bs-primary); border-color: var(--bs-primary); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--bs-primary); }
.nav { --bs-nav-link-color: var(--bs-secondary-color); --bs-nav-link-hover-color: var(--bs-emphasis-color); }
.pagination { --bs-pagination-active-bg: var(--bs-primary); --bs-pagination-active-border-color: var(--bs-primary); --bs-pagination-color: var(--bs-body-color); --bs-pagination-focus-box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.progress, .progress-stacked { --bs-progress-bar-bg: var(--bs-primary); }
.list-group { --bs-list-group-active-bg: var(--bs-primary); --bs-list-group-active-border-color: var(--bs-primary); }
.dropdown-menu { --bs-dropdown-link-active-bg: var(--bs-primary); border-radius: .875rem; box-shadow: var(--wdw-shadow-sm); }
.accordion { --bs-accordion-active-bg: var(--bs-primary-bg-subtle); --bs-accordion-active-color: var(--bs-primary-text-emphasis); --bs-accordion-btn-focus-box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.badge { font-weight: 600; }
/* Library building blocks — use these instead of re-inventing them per snippet. */
.wdw-stage { min-height: 100vh; display: flex; align-items: center; background: var(--wdw-stage); padding-block: 3rem; }
.wdw-card { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent); border-radius: var(--wdw-radius-card); box-shadow: var(--wdw-shadow); }
.wdw-card-sm { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent); border-radius: 1rem; box-shadow: var(--wdw-shadow-sm); }
.wdw-aurora { position: relative; color: #fff; background: radial-gradient(60% 55% at 100% 0, #818cf8 0, transparent 70%), radial-gradient(65% 60% at 0 100%, #ec4899 0, transparent 65%), #1e1b4b; }
.wdw-eyebrow { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bs-primary); }
.wdw-heading { font-weight: 800; letter-spacing: -.02em; color: var(--bs-emphasis-color); }
.wdw-muted { color: var(--bs-secondary-color); }
.wdw-icon { width: 2.75rem; height: 2.75rem; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: .875rem; background: var(--bs-primary-bg-subtle); color: var(--bs-primary); }
/* Component */
.profiles .profile{position:relative;overflow:hidden;border-radius:1.25rem;aspect-ratio:4/5;background:#1e1b4b;box-shadow:var(--wdw-shadow)}
.profiles .profile img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 25%;transition:transform .5s ease}
.profiles .profile.is-open img{transform:scale(1.04)}
.profiles .profile::after{content:"";position:absolute;inset:0;background:linear-gradient(to top,rgba(15,12,40,.92) 0,rgba(15,12,40,.55) 38%,rgba(15,12,40,0) 65%);transition:background .3s;pointer-events:none}
.profiles .profile.is-open::after{background:linear-gradient(to top,rgba(15,12,40,.95) 0,rgba(15,12,40,.85) 55%,rgba(15,12,40,.2) 100%)}
.profiles .profile-over{position:absolute;left:0;right:0;bottom:0;z-index:1;padding:1.25rem;color:#fff}
.profiles .profile-role{color:rgba(255,255,255,.8)}
.profiles .profile-toggle{width:44px;height:44px;flex:none;border-radius:50%;border:1px solid rgba(255,255,255,.4);background:rgba(255,255,255,.14);color:#fff;display:inline-flex;align-items:center;justify-content:center;backdrop-filter:blur(6px)}
.profiles .profile-toggle:hover{background:rgba(255,255,255,.28)}
.profiles .profile-toggle:focus-visible,.profiles .profile-social:focus-visible{outline:2px solid #fff;outline-offset:2px}
.profiles .profile-toggle svg{transition:transform .3s}
.profiles .profile.is-open .profile-toggle svg{transform:rotate(180deg)}
.profiles .profile-bio{display:grid;grid-template-rows:0fr;opacity:0;visibility:hidden;transition:grid-template-rows .35s ease,opacity .3s,visibility .3s}
.profiles .profile-bio-in{overflow:hidden;min-height:0;color:rgba(255,255,255,.92)}
.profiles .profile.is-open .profile-bio{grid-template-rows:1fr;opacity:1;visibility:visible}
.profiles .profile-chip{background:rgba(255,255,255,.16);color:#fff;font-weight:600;padding:.45em .8em}
.profiles .profile-social{width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.16);color:#fff;display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
.profiles .profile-social:hover{background:rgba(255,255,255,.3);color:#fff}
@media (prefers-reduced-motion:reduce){.profiles *{transition:none!important}}
(function initProfiles() {
var cards = document.querySelectorAll('.profiles .profile');
if (!cards.length || !window.matchMedia) return;
var hover = window.matchMedia('(hover: hover) and (pointer: fine)');
function set(card, open) {
var btn = card.querySelector('.profile-toggle');
var bio = card.querySelector('.profile-bio');
card.classList.toggle('is-open', open);
btn.setAttribute('aria-expanded', String(open));
bio.inert = !open;
}
cards.forEach(function (card) {
var btn = card.querySelector('.profile-toggle');
// Touch / coarse pointer: tap toggles. Fine pointer: hover and focus drive it.
btn.addEventListener('click', function () {
set(card, hover.matches ? true : !card.classList.contains('is-open'));
});
card.addEventListener('mouseenter', function () { if (hover.matches) set(card, true); });
card.addEventListener('mouseleave', function () { if (hover.matches) set(card, false); });
card.addEventListener('focusin', function () { if (hover.matches) set(card, true); });
card.addEventListener('focusout', function (e) {
if (hover.matches && !card.contains(e.relatedTarget)) set(card, false);
});
card.addEventListener('keydown', function (e) {
if (e.key === 'Escape') { set(card, false); btn.focus(); }
});
});
})();
Built on Bootstrap 5.3.8 with plain JavaScript — no jQuery. Supports light and dark mode via data-bs-theme.