Avatar
Bootstrap 5 Avatar component
Responsive Avatar built with Bootstrap 5. Examples of circle or square avatar, avatar in a card, inside the navbar, testimonial carousel, profile card & more.
Basic example
This is a basic example of a circle-shaped avatar. The roundness is achieved by adding the
.rounded-circle
class. You can experiment with different border radius to change the roundness of the
image corners. Make sure to check out the Image documentation to learn more about
image options and responsiveness.
<img src="https://mdbcdn.b-cdn.net/img/new/avatars/2.webp" class="rounded-circle" style="width: 150px;"
alt="Avatar" />
With shadows
Adding a shadow to your avatar will make it stand out. You can generate a custom shadow with our generator.
<img src="https://mdbcdn.b-cdn.net/img/new/avatars/1.webp" class="rounded-circle shadow-4"
style="width: 150px;" alt="Avatar" />
Square
The default image shape is rectangular. If you need your avatar to be a square you need to make sure that your source image is of equal width an height, or overwrite them with CSS. You can also make the corners slightly rounded, like in the example below, in order to create a smoother design.
Rounded corners are applied with the .rounded-3
class, you can use different roundness levels from
our Border Radius docs, or
even create a fancy, irregular border shape with our Fancy Shapes Generator.
<img src="https://mdbcdn.b-cdn.net/img/new/avatars/5.webp" class="rounded-3" style="width: 150px;"
alt="Avatar" />
With content
Add additional content to your avatar. The most common use case is adding name and surname along with a text description, but you can also use a variety of other elements like Badges, Buttons, Text Animations, Icons or even Flags that indicate the country of origin.
John Doe
Web designer PRO
<img src="https://mdbcdn.b-cdn.net/img/new/avatars/8.webp" class="rounded-circle mb-3" style="width: 150px;"
alt="Avatar" />
<h5 class="mb-2"><strong>John Doe</strong></h5>
<p class="text-muted">Web designer <span class="badge bg-primary">PRO</span></p>
Carousel
Avatars are often used inside Testimonial Sliders and generally in many Review Designs.
Besides the avatar itself, the key elements of a good review design are Star Ratings and customer opinions, usually presented with a preceding quotation mark icon.
You can also embed more than one review in a single slide, change the speed of carousel transitions and customize your testimonial slider even further with our Carousel documentation.
<!-- Carousel wrapper -->
<div id="carouselExampleControls" data-mdb-carousel-init class="carousel slide text-center carousel-dark" data-mdb-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<img class="rounded-circle shadow-1-strong mb-4"
src="https://mdbcdn.b-cdn.net/img/Photos/Avatars/img%20(10).webp" alt="avatar"
style="width: 150px;" />
<div class="row d-flex justify-content-center">
<div class="col-lg-8">
<h5 class="mb-3">Maria Kate</h5>
<p>Photographer</p>
<p class="text-muted">
<i class="fas fa-quote-left pe-2"></i>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus et deleniti
nesciunt sint eligendi reprehenderit reiciendis, quibusdam illo, beatae quia
fugit consequatur laudantium velit magnam error. Consectetur distinctio fugit
doloremque.
</p>
</div>
</div>
<ul class="list-unstyled d-flex justify-content-center text-warning mb-0">
<li><i class="fas fa-star fa-sm"></i></li>
<li><i class="fas fa-star fa-sm"></i></li>
<li><i class="fas fa-star fa-sm"></i></li>
<li><i class="fas fa-star fa-sm"></i></li>
<li><i class="far fa-star fa-sm"></i></li>
</ul>
</div>
<div class="carousel-item">
<img class="rounded-circle shadow-1-strong mb-4"
src="https://mdbcdn.b-cdn.net/img/Photos/Avatars/img%20(32).webp" alt="avatar"
style="width: 150px;" />
<div class="row d-flex justify-content-center">
<div class="col-lg-8">
<h5 class="mb-3">John Doe</h5>
<p>Web Developer</p>
<p class="text-muted">
<i class="fas fa-quote-left pe-2"></i>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus et deleniti
nesciunt sint eligendi reprehenderit reiciendis.
</p>
</div>
</div>
<ul class="list-unstyled d-flex justify-content-center text-warning mb-0">
<li><i class="fas fa-star fa-sm"></i></li>
<li><i class="fas fa-star fa-sm"></i></li>
<li><i class="fas fa-star fa-sm"></i></li>
<li><i class="fas fa-star fa-sm"></i></li>
<li><i class="far fa-star fa-sm"></i></li>
</ul>
</div>
<div class="carousel-item">
<img class="rounded-circle shadow-1-strong mb-4"
src="https://mdbcdn.b-cdn.net/img/Photos/Avatars/img%20(1).webp" alt="avatar" style="width: 150px;" />
<div class="row d-flex justify-content-center">
<div class="col-lg-8">
<h5 class="mb-3">Anna Deynah</h5>
<p>UX Designer</p>
<p class="text-muted">
<i class="fas fa-quote-left pe-2"></i>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus et deleniti
nesciunt sint eligendi reprehenderit reiciendis, quibusdam illo, beatae quia
fugit consequatur laudantium velit magnam error. Consectetur distinctio fugit
doloremque.
</p>
</div>
</div>
<ul class="list-unstyled d-flex justify-content-center text-warning mb-0">
<li><i class="fas fa-star fa-sm"></i></li>
<li><i class="fas fa-star fa-sm"></i></li>
<li><i class="fas fa-star fa-sm"></i></li>
<li><i class="fas fa-star fa-sm"></i></li>
<li><i class="far fa-star fa-sm"></i></li>
</ul>
</div>
</div>
<button data-mdb-button-init class="carousel-control-prev" type="button" data-mdb-target="#carouselExampleControls"
data-mdb-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button data-mdb-button-init class="carousel-control-next" type="button" data-mdb-target="#carouselExampleControls"
data-mdb-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
<!-- Carousel wrapper -->
Testimonials
Customer reviews with avatars, can also work great within simple Cards. Check our our Card Generator in order to create a basic card layout template and add custom CSS to experiment with avatar composition within a card.
Testimonials
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugit, error amet numquam iure provident voluptate esse quasi, veritatis totam voluptas nostrum quisquam eum porro a pariatur veniam.
Maria Smantha
Lorem ipsum dolor sit amet eos adipisci, consectetur adipisicing elit.
Lisa Cudrow
Neque cupiditate assumenda in maiores repudi mollitia architecto.
John Smith
Delectus impedit saepe officiis ab aliquam repellat rem unde ducimus.
<section>
<div class="row d-flex justify-content-center">
<div class="col-md-10 col-xl-8 text-center">
<h3 class="mb-4">Testimonials</h3>
<p class="mb-4 pb-2 mb-md-5 pb-md-0">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugit, error amet
numquam iure provident voluptate esse quasi, veritatis totam voluptas nostrum
quisquam eum porro a pariatur veniam.
</p>
</div>
</div>
<div class="row text-center">
<div class="col-md-4 mb-5 mb-md-0">
<div class="card testimonial-card">
<div class="card-up" style="background-color: #9d789b;"></div>
<div class="avatar mx-auto bg-white">
<img src="https://mdbcdn.b-cdn.net/img/Photos/Avatars/img%20(1).webp"
class="rounded-circle img-fluid" />
</div>
<div class="card-body">
<h4 class="mb-4">Maria Smantha</h4>
<hr />
<p class="dark-grey-text mt-4">
<i class="fas fa-quote-left pe-2"></i>Lorem ipsum dolor sit amet eos adipisci,
consectetur adipisicing elit.
</p>
</div>
</div>
</div>
<div class="col-md-4 mb-5 mb-md-0">
<div class="card testimonial-card">
<div class="card-up" style="background-color: #7a81a8;"></div>
<div class="avatar mx-auto bg-white">
<img src="https://mdbcdn.b-cdn.net/img/Photos/Avatars/img%20(2).webp"
class="rounded-circle img-fluid" />
</div>
<div class="card-body">
<h4 class="mb-4">Lisa Cudrow</h4>
<hr />
<p class="dark-grey-text mt-4">
<i class="fas fa-quote-left pe-2"></i>Neque cupiditate assumenda in maiores
repudi mollitia architecto.
</p>
</div>
</div>
</div>
<div class="col-md-4 mb-0">
<div class="card testimonial-card">
<div class="card-up" style="background-color: #6d5b98;"></div>
<div class="avatar mx-auto bg-white">
<img src="https://mdbcdn.b-cdn.net/img/Photos/Avatars/img%20(9).webp"
class="rounded-circle img-fluid" />
</div>
<div class="card-body">
<h4 class="mb-4">John Smith</h4>
<hr />
<p class="dark-grey-text mt-4">
<i class="fas fa-quote-left pe-2"></i>Delectus impedit saepe officiis ab
aliquam repellat rem unde ducimus.
</p>
</div>
</div>
</div>
</div>
</section>
.testimonial-card .card-up {
height: 120px;
overflow: hidden;
border-top-left-radius: 0.25rem;
border-top-right-radius: 0.25rem;
}
.testimonial-card .avatar {
width: 110px;
margin-top: -60px;
overflow: hidden;
border: 3px solid #fff;
border-radius: 50%;
}
Profile
Avatars are often used in user profile cards. The example below was created with a basic Bootstrap Grid. You can use the Grid Builder to quickly sketch out the general grid layout.
Danny McLoan
Senior Journalist
Articles
41
Followers
976
Rating
8.5
<section style="background-color: #9de2ff;">
<div class="container py-5 h-100">
<div class="row d-flex justify-content-center align-items-center h-100">
<div class="col-8">
<div class="card" style="border-radius: 15px;">
<div class="card-body p-4">
<div class="d-flex">
<div class="flex-shrink-0">
<img src="https://mdbcdn.b-cdn.net/img/Photos/new-templates/bootstrap-profiles/avatar-1.webp"
alt="Generic placeholder image" class="img-fluid"
style="width: 180px; border-radius: 10px;" />
</div>
<div class="flex-grow-1 ms-3">
<h5 class="mb-1">Danny McLoan</h5>
<p class="mb-2 pb-1">
Senior Journalist
</p>
<div class="d-flex justify-content-start rounded-3 p-2 mb-2 bg-body-tertiary">
<div>
<p class="small text-muted mb-1">
Articles
</p>
<p class="mb-0">41</p>
</div>
<div class="px-3">
<p class="small text-muted mb-1">
Followers
</p>
<p class="mb-0">976</p>
</div>
<div>
<p class="small text-muted mb-1">
Rating
</p>
<p class="mb-0">8.5</p>
</div>
</div>
<div class="d-flex pt-1">
<button type="button" data-mdb-button-init data-mdb-ripple-init class="btn btn-secondary me-1 flex-grow-1">
Chat
</button>
<button type="button" data-mdb-button-init data-mdb-ripple-init class="btn btn-primary flex-grow-1">
Follow
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>