Avatar

Represent a user, team, or entity with an image, icon, or initials.

Avatar

Rounded (default)

Add an avatar easily and with functionality with the component <s-avatar>

Color

Change the color of the compound with the color property, the colors allowed are the main colors of Sax Design and (HEX, RGB)

Size

Change the size of the component to the number provided if for example the size value is 60 equivalent to 60px in height and width

Badge

Add a badge to the component with the badge property or the slot

You can also change the color to represent a user status as disconnected or connected with colors such as success or danger, this you do with the badge-color property

There are times when you need to use the avatar in a chat environment and for this you can add the writing property that adds a writing animation

Auto font and split

If the user has a short name, it is added as it is but if it is a very long text or has several spaces, the text to be displayed will be automatically generated so that it can be seen correctly

The maximum length of characters is 5. When that limit is exceeded, changes are made in the text

Circle

Change the border-radius of the entire component to 50% with the circle property making it fully circular

Square

Change the border-radius of the entire component to 0% with the square property making it completely square

History

It generates a border around the avatar, this is usually used to represent that the user is doing an action or in many cases has a History

You can make the border a gradient like instagram with the property history-gradient

Icon

You can put an icon inside an avatar when for example an image is not yet added or is a new user, for this you can simply use the default slot

Loading

Add a loading animation to the component, this property is a boolean so you can add it without any value

Action icons

Add a space next to the avatar with the slot icons where you can put icons for some dynamic action of that user in specific

Group

Use s-avatar-group to stack avatars. max limits visible members; remaining members appear in a separate +N avatar. overlap sets the overlap in pixels, and size supplies the default size unless an individual Avatar overrides it. Use shape="circle" for circular photos and float for side-by-side placement.

The overflow slot receives { count } for custom counter content. Changes to members and max update the visible count automatically.

API

PROPS

Property
Type
Values
Description
default
Example
More
badge-position
String
top-left | top-right | bottom-left | bottom-right
Position the optional badge around the avatar.
top-right
—
color
String
primary | success | danger | warn | warning | dark | text | light | secondary | RGB | RGBA | HEX | HSL | HSLA
color of the component.
--sax-gray-2
size
Number
Number
size of the avatar component.
44
badge
Boolean
truefalse
Determine if the badge is active.
false
badge-color
String
primary | success | danger | warn | warning | dark | text | light | secondary | RGB | RGBA | HEX | HSL | HSLA
Change the color of the badge inside the avatar.
primary
shape
String
squarecircle
Change the style of the avatar by circulating it.
false
writing
Boolean
truefalse
Add an animation to the writing badge.
false
history
Boolean
truefalse
Add a border to the avatar.
gray-2
history-gradient
Boolean
truefalse
Change the color of the border to a gradient.
false
loading
Boolean
truefalse
Add a loading animation to the avatar.
false
pointer
Boolean
truefalse
Determine if the avatar has a pointer cursor.
false
—

SAvatarGroup props

Property
Type
Values
Description
default
Example
More
max
number | string
number
(s-avatar-group) Limit visible members; additional members appear in a separate counter.
—
overlap
number
number
(s-avatar-group) Overlap between adjacent avatars in pixels.
18
size
number | string
number
(s-avatar-group) Default avatar size; individual avatars may override it.
—
float
Boolean
truefalse
(s-avatar-group) change the way the avatar is composed by placing one next to the other.
false

SLOTS

Slot
Scope
Description
default
Example
More
overflow
{ count: number }
(s-avatar-group) Custom overflow counter content.
—
text
null
Add text within the avatar component.
—
badge
null
Add to the badge everything that is inside the slot, commonly used for numbers and an icon.
—
icons
null
Add a space to put icons next to the avatar.
—
Last Updated: 2026-10-28, 06:17:56 UTC
Copied