EN
Getting started
42 · Extended UI

Avatar

Represents a person or a record with a small, round image. Without a photo, initials are generated from the name; colors, a status dot and an overlapping group view are supported.

PRO acun:avatar
01

Sizes

Choose xs or sm in dense tables and lists, the default md in menus and cards, and lg or xl in profile headers. The size is set with the size prop.

LIVE EXAMPLE
<div class="flex flex-wrap items-center gap-4">
    <acun:avatar name="Ayşe Yılmaz" size="xs" />
    <acun:avatar name="Ayşe Yılmaz" size="sm" />
    <acun:avatar name="Ayşe Yılmaz" />
    <acun:avatar name="Ayşe Yılmaz" size="lg" />
    <acun:avatar name="Ayşe Yılmaz" size="xl" />
</div>
PropValues
sizexs | sm | md | lg | xl
02

Shapes

The default shape is a circle. For records that are not people, such as organizations, teams or products, use a square with rounded corners via shape="rounded-sm".

LIVE EXAMPLE
<div class="flex flex-wrap items-center gap-4">
    <acun:avatar name="Ayşe Yılmaz" size="lg" />
    <acun:avatar name="Acun Soft" size="lg" shape="rounded-sm" />
</div>
PropValues
shapecircle | rounded-sm
03

Initials and colors

Without a photo, the initials of the first two words in name are shown ("Ayşe Yılmaz" → AY). The background color is chosen with color; you can use different colors to tell people apart in the same list.

LIVE EXAMPLE
<div class="flex flex-wrap items-center gap-4">
    <acun:avatar name="Ayşe Yılmaz" />
    <acun:avatar name="Mehmet Kaya" color="success" />
    <acun:avatar name="Zeynep Arslan" color="warning" />
    <acun:avatar name="Emre Demir" color="danger" />
    <acun:avatar name="Fatma Şahin" color="info" />
    <acun:avatar name="Can Öztürk" color="secondary" />
</div>
PropValues
nameFull name; the initials are generated from it
colorprimary | secondary | success | danger | warning | info | dark (brand = primary, neutral = secondary)
04

Photo

When src is given, the photo is shown; name is still used as the alternative text. Remember to give name so that no blank space is left if the photo fails to load.

BLADE
<acun:avatar src="{{ $user->avatar_url }}" :name="$user->name" size="lg" />
PropValues
srcPhoto address
05

Status

status adds a small status dot at the bottom right: online, offline, away or busy. Suitable for chat and team lists.

LIVE EXAMPLE
<div class="flex flex-wrap items-center gap-4">
    <acun:avatar name="Ayşe Yılmaz" status="online" />
    <acun:avatar name="Mehmet Kaya" color="success" status="offline" />
    <acun:avatar name="Zeynep Arslan" color="warning" status="away" />
    <acun:avatar name="Emre Demir" color="danger" status="busy" />
</div>
PropValues
statusonline | offline | away | busy
06

Groups

Show several people overlapping with acun:avatar-group. Add the number of people not shown as "+N" with more.

LIVE EXAMPLE
<acun:avatar-group :more="4">
    <acun:avatar name="Ayşe Yılmaz" />
    <acun:avatar name="Mehmet Kaya" color="success" />
    <acun:avatar name="Zeynep Arslan" color="warning" />
    <acun:avatar name="Emre Demir" color="info" />
</acun:avatar-group>
PropValues
moreNumber of people not shown ("+N"); hidden when 0
API

Props and slots

The values the component accepts.

PropDefaultDescription
src, namenullWithout a photo, initials from the name
sizemdxs · sm · md · lg · xl
shapecirclecircle · rounded-sm
statusnullonline · offline · away · busy
colorprimaryprimary · secondary · success · danger · warning · info · dark (brand = primary, neutral = secondary)
avatar-group: more0"+N" indicator
avatar-group: sizemdSize of the "+N" indicator; give the same as the avatars (xs · sm · md · lg · xl)
Acun UI · AvatarDetailed usage and examples