role presentation
Avatar draft v0.1.0
Represents a person or an entity with a picture, or their initials when there is none.
An avatar shows who or what something belongs to: the author of a comment, the members of a project, a workspace. It displays a picture when there is one and the initials of the name otherwise, in a circle or a rounded square. Assistive technology reads it as an image named by the person, unless the name is written right next to it, in which case the avatar is decoration.
Playground
Token inspector
Part container
Not rendered in this configuration.
-
size
smallfrom default{size.4}Details
- Value
-
24px - CSS
--avatar-container-size-small- Token
avatar.container.size.small- Decisions
-
size
mediumfrom default{size.5}Details
- Value
-
32px - CSS
--avatar-container-size-medium- Token
avatar.container.size.medium- Decisions
-
size
largefrom default{size.6}Details
- Value
-
40px - CSS
--avatar-container-size-large- Token
avatar.container.size.large- Decisions
-
border-radius
circlefrom default{corner-radius.full}Details
- Value
-
9999px - CSS
--avatar-container-border-radius-circle- Token
avatar.container.border-radius.circle- Decisions
-
border-radius
squarefrom default{corner-radius.xs}Details
- Value
-
4px - CSS
--avatar-container-border-radius-square- Token
avatar.container.border-radius.square- Decisions
-
background from default
{global.bg.subtle.brand.default}Details
- Resolves through
brand.light.50 raw- Value
-
#EEF1F7dark:#09191D - CSS
--avatar-container-background- Token
avatar.container.background- Decisions
-
border-color from default
{global.border.level.edge.level.1}Details
- Resolves through
light-switch.base.300 rawneutral.light.ash.300 raw- Value
-
#D7D3D4dark:#282828 - CSS
--avatar-container-border-color- Token
avatar.container.border-color- Decisions
-
border-width from default
{stroke-width.sm}Details
- Value
-
0.6px - CSS
--avatar-container-border-width- Token
avatar.container.border-width- Decisions
Part image
Not rendered in this configuration.
No tokens of its own: it inherits from its parent.
Part initials
Not rendered in this configuration.
-
color from default
{global.text.on-subtle.brand.default}Details
- Resolves through
brand.light.700 raw- Value
-
#1148A9dark:#9EE7FA - CSS
--avatar-initials-color- Token
avatar.initials.color- Decisions
-
typography
smallfrom defaultDetails
- Value
-
Inter [object Object]/1.2 500 [object Object] - CSS
--avatar-initials-typography-small-font-family- Token
avatar.initials.typography.small- Decisions
-
typography
mediumfrom defaultDetails
- Value
-
Inter [object Object]/1.2 500 [object Object] - CSS
--avatar-initials-typography-medium-font-family- Token
avatar.initials.typography.medium- Decisions
-
typography
largefrom defaultDetails
- Value
-
Inter [object Object]/1.2 500 [object Object] - CSS
--avatar-initials-typography-large-font-family- Token
avatar.initials.typography.large- Decisions
<span
class="ds-avatar"
data-size="medium"
data-shape="circle"
role="img"
aria-label="Ada Lovelace"
>
<span
class="ds-avatar__initials"
data-part="initials"
aria-hidden="true"
>AL</span>
</span>