Avatars
Sizing - Images
Create and group avatars of different sizes and shapes with the css classes. Using Bootstrap's naming convention, you can control size of avatar including standard avatar, or scale it up to different sizes.
.avatar-xs
.avatar-sm
.avatar-md
.avatar-lg
.avatar-xl
<!-- Avatar Extra Small -->
<img src="assets/images/users/avatar-2.jpg" alt="image" class="img-fluid avatar-xs">
<!-- Avatar Small -->
<img src="assets/images/users/avatar-2.jpg" alt="image" class="img-fluid avatar-sm">
<!-- Avatar Medium -->
<img src="assets/images/users/avatar-2.jpg" alt="image" class="img-fluid avatar-md">
<!-- Avatar Large -->
<img src="assets/images/users/avatar-2.jpg" alt="image" class="img-fluid avatar-lg">
<!-- Avatar Extra Large -->
<img src="assets/images/users/avatar-2.jpg" alt="image" class="img-fluid avatar-xl">
Rounded Circle
Using an additional class .rounded-circle
in <img>
element creates the rounded avatar.
.avatar-md .rounded-circle
.avatar-lg .rounded-circle
.avatar-xl .rounded-circle
<!-- Avatar Medium -->
<img src="assets/images/users/avatar-2.jpg" alt="image" class="img-fluid avatar-md rounded-circle">
<!-- Avatar Large -->
<img src="assets/images/users/avatar-2.jpg" alt="image" class="img-fluid avatar-lg rounded-circle">
<!-- Avatar Extra Large -->
<img src="assets/images/users/avatar-2.jpg" alt="image" class="img-fluid avatar-xl rounded-circle">
Sizing - Background Color
Using utilities classes of background e.g. bg-*
allows you to have any background color as well.
Using .avatar-xs
Using .avatar-sm
Using .avatar-md
Using .avatar-lg
Using .avatar-xl
<!-- Avatar Extra Small -->
<div class="avatar-xs">
<span class="avatar-title bg-success rounded">
xs
</span>
</div>
<!-- Avatar Small -->
<div class="avatar-sm">
<span class="avatar-title bg-success rounded">
sm
</span>
</div>
<!-- Avatar Medium -->
<div class="avatar-md">
<span class="avatar-title bg-success rounded">
md
</span>
</div>
<!-- Avatar Large -->
<div class="avatar-lg">
<span class="avatar-title bg-success rounded">
lg
</span>
</div>
<!-- Avatar Extra Small -->
<div class="avatar-xl">
<span class="avatar-title bg-success rounded">
xl
</span>
</div>
Rounded Circle Background
Using an additional class .rounded-circle
in <img>
element creates the rounded avatar.
Using .avatar-md .rounded-circle
Using .avatar-lg .rounded-circle
Using .avatar-xl .rounded-circle
<!-- Avatar Medium -->
<div class="avatar-md">
<span class="avatar-title bg-success rounded-circle">
md
</span>
</div>
<!-- Avatar Large -->
<div class="avatar-lg">
<span class="avatar-title bg-success rounded-circle">
lg
</span>
</div>
<!-- Avatar Extra Small -->
<div class="avatar-xl">
<span class="avatar-title bg-success rounded-circle">
xl
</span>
</div>
Images shapes
Avatars with different sizes and shapes.
.rounded
.rounded
.rounded-circle
.img-thumbnail
.rounded-circle .img-thumbnail
<!-- Rounded -->
<img src="assets/images/small/small-2.jpg" alt="image" class="img-fluid rounded" width="200"/>
<!-- Rounded Circle-->
<img src="assets/images/user/avatar-1.jpg" alt="image" class="img-fluid rounded-circle" width="120"/>
<!-- Thumbnail-->
<img src="assets/images/small/small-3.jpg" alt="image" class="img-fluid img-thumbnail" width="200"/>
<!-- Thumbnail Circle-->
<img src="assets/images/user/avatar-2.jpg" alt="image" class="img-fluid img-thumbnail rounded-circle" width="120"/>