Skip to content

Avatar

Stable

A round picture that shows who wrote a message: a letter for a person, a dark circle with a lime spark for the assistant.

Also known as profile picture, user image, persona

Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.

User and assistant

L

The kind picks the look. The name only matters for a person.

When to use it

Shows who wrote a message. A person gets the first letter of their name; the assistant gets a dark circle with a lime spark, so its turns are easy to spot at a glance.

Made of: Circle · Letter or sparkle

Use it for

  • Beside each assistant reply in a conversation.
  • Next to a person's name in a list or a header.
  • In tight rows such as a chat list: use the small size.

Not for

  • Several people shown together: use AvatarStack.
  • Showing a status or that something needs a person: use AttentionDot.
  • Showing whether a voice assistant is listening or speaking: use AIPresence.

Do and avoid

M Mira Shah
Do. A plain circle with a first letter marks a person.
Mira Shah
Avoid. The assistant's spark on a person makes people think a bot wrote it.

Do

  • Use the person's real name so the letter and the screen reader name are right.
  • Use small in tight lists and medium beside messages.
  • Use the assistant style wherever the assistant speaks, so people recognise it.
  • Keep the fixed sizes so avatars stay round.

Avoid

  • Do not use lime for a person. A lime spark on a circle is only for the assistant.
  • Do not expect a full name to show. Only the first letter appears.
  • Do not use Avatar to show status. Use AttentionDot or Badge.
  • Do not change the colors of the assistant avatar.

On a phone

  • Avatar is a fixed 24px or 32px circle and does not change on a phone.
  • It is not a control. If it opens a profile or menu, wrap it in a button, which gets a 44px target on touch screens.

Build your next AI screen with Tattva.

Free and open, with the code. Start in one line.

Get started