EDS4 logo
@eds/react/avatar
v0.0.0

Avatar

A visual representation of a user.
Prop
Required
Description
Type
aria-hidden
—

Indicates whether the element is exposed to an accessibility API.

false | true | "true" | "false"
name
—

Used for the image's alt attribute, and for the name initials when there is no image (src) provided.

string
size
—

The size of the avatar. Defaults to medium.

"xsmall" | "small" | "medium" | "large" | "xlarge"Supports responsive prop syntax
disabled
—

Optionally set the avatar as disabled.

boolean
src
—

Optionally set the avatar image.

string
maxRetries
—

Maximum number of retry attempts for loading the avatar image. Defaults to 3.

number
retryDelay
—

Initial delay in milliseconds before first retry. Defaults to 1000.

number
Prop
Required
Description
Type
children
✅

Pass in <Avatar />s as children.

ReactElement<AvatarProps, string | JSXElementConstructor<any>>[]
aria-hidden
—

Indicates whether the element is exposed to an accessibility API.

false | true | "true" | "false"
size
—

The size of the avatar within the group. Defaults to medium.

"xsmall" | "small" | "medium" | "large" | "xlarge"Supports responsive prop syntax
cap
—

Max number of avatars to be displayed.

number