Avatar
A user or organization image, shown as a circle or a square.
CircleS
SquareS
<template> <Avatar shape="Circle" size="sm" /></template>Props
| Name | Type | Default |
|---|---|---|
| src | string | - |
| alt | string | - |
| shape | "Circle" | "Square" | "Circle" |
| size | "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "md" |
Guidelines
Do
- Use
shape="Circle"(the default) for real user avatars - it's whatUAvatarrenders out of the box. - Reach for
shape="Square"only where the surrounding layout is already square-cornered (dense tables, integration lists) -Circleis the default everywhere else.
Don't
- Don't mix shapes within the same list of avatars (e.g. an
AvatarGroup) - pick one shape per context.
Related components
AvatarGroup
An overlapping stack of avatars.
CBA
<template> <UAvatarGroup> <Avatar alt="A" /> <Avatar alt="B" /> <Avatar alt="C" /> </UAvatarGroup></template>LabeledAvatar
An avatar paired with a name, and an optional subtitle and status badge.
Subtitle + badge
S
Shadcn
StatusPro plan
Small size
S
Shadcn
<template> <LabeledAvatar name="Shadcn" subtitle="Pro plan" :badge="true" /></template>Props
| Name | Type | Default |
|---|---|---|
| name | string | - |
| subtitle | string | - |
| src | string | - |
| badge | boolean | false |
| size | "default" | "sm" | "default" |
Guidelines
Do
- Use the
defaultsize wherever there's room for a name and secondary line (account menus, member lists) - thebadgeprop is meant for a lightweight status flag like "Owner" or "Invited", not for arbitrary content. - Use
smfor dense contexts (comment threads, activity feeds) where only the name matters. - Pass
srcwhen you have a real avatar image; omit it to fall back to initials viaUAvatar.
Don't
- Don't show
subtitleorbadgeatsize="sm"- the component doesn't render them there on purpose, since there's no room and it would crowd the row. Usesize="default"instead if you need that context. - Don't use this for a bare avatar with no accompanying text - use
UAvatardirectly.