Bootstrap 5 avatar component built with CSS. Bootstrap has no built-in avatar — these patterns show how to build them cleanly using flexbox and positioning.
Quick CSS
.avatar {
width: 40px; height: 40px;
border-radius: 50%;
display: inline-flex;
align-items: center;
justify-content: center;
font-weight: 700;
color: #fff;
font-size: 0.85rem;
}
Key Patterns
| Pattern | CSS Trick |
|---|---|
| Initials avatar | display:flex + align-items:center |
| Status badge | position:absolute on wrapper |
| Avatar group | margin-left:-10px + border:2px solid #fff |
| Image avatar | img + border-radius:50% + object-fit:cover |
1. Bootstrap 5 Avatar Sizes
Avatar components in all sizes with initials fallback and image variants.
2. Bootstrap 5 Avatar with Status Badge
Avatars with online/offline/away status indicators — common in chat and team UIs.
3. Bootstrap 5 Avatar Group Stack
Overlapping avatar group — common for showing team members, contributors and likes.
4. Bootstrap 5 Avatar in User Cards
Avatars used in user profile cards, comment sections and team listings.
Frequently Asked Questions
Need a Full Bootstrap 5 Admin Dashboard?
Get a complete Angular 21 + Bootstrap 5 dashboard with 50+ components — built by the same team behind BootstrapPlanet.
Browse Templates →Use code FIRST30 for 30% off your first purchase.