Skip to content
SENVENLI UI

Avatar

A person or a company shown by photo, initials or icon, alone or in a stacked group.
People
import { Avatar, AvatarGroup } from "@senvenli/react/display";

Examples

Sizes

Small in dense rows, medium by default, large on a profile.

A company

Squares are for companies and logos; circles are for people.

A group

Past `max`, the rest fold into a count.

Guidelines

When to use it

  • Identifying who did something or who belongs to something.

Use something else when

  • The object is not a person or a company. Icon

Do and avoid

  • Use circles for people and squares for companies.

Accessibility

Built in

  • Named by name; presence is announced as online.
  • AvatarGroup announces how many more people are hidden.

You provide

  • An aria-label on AvatarGroup that names the group.

API reference

Avatar

nameRequired
string

The person's or company's name: the initials and the accessible name.

src
string

Photo or company logo; initials (or the icon) show until it loads and if it fails.

size
AvatarSize
shape
AvatarShapeDefault "circle"

circle for people, square for companies and logos (contained, never stretched).

presence
"online"

Shows the 10px online dot and says "online" in the name.

AvatarGroup

childrenRequired
React.ReactNode

Avatars; past max they fold into a "+N" avatar.

max
numberDefault 4

How many show before the "+N"; default 4.

size
AvatarSizeDefault "medium"
aria-label
string

Names the group ("Team members").