Did you know?dyk.si

Avatar

A circle with a person’s photo, falling back to their initials when there is none.

<img alt> + initials fallback

When to use it

Wherever a person appears.

Common mistake

Don’t give every initials avatar the same color.

Accessibility

Give it alt text with the name, or hide it if the name is already next to it.

Name in code

HTML/CSS<img alt> + initials fallback
React<Avatar> + <AvatarFallback>
Jetpack ComposeAsyncImage + Box(CircleShape)
SwiftUIAsyncImage + .clipShape(Circle())

Ready prompt for your coding agent

Add a Avatar to this screen. What it is: A circle with a person’s photo, falling back to their initials when there is none. Implement with: <img alt> + initials fallback (HTML/CSS). Accessibility: Give it alt text with the name, or hide it if the name is already next to it. When to use it: Wherever a person appears. Avoid: Don’t give every initials avatar the same color. Reuse the project's existing design tokens, spacing and component conventions.

Or compose a whole page from this element and others →

Prompts are in English for the most precise results with coding agents.