Content
- No text of its own. The name next to it says who it is; the badge says what they are.
A person's photo or initials, a member or Super Connector badge, and stacks of faces.
import { … } from "@brdgapp/ui/components/avatar"Avatar is a person's photo in a circle, or their initials on light blue when there's no photo, with an optional corner badge for a Bridge member, a Super Connector, or an account that needs attention. AvatarGroup stacks a few faces and counts the rest. Pass names and photo URLs; the component works out the initials, shows them while a photo loads, and keeps them if it fails. The usual mistake is drawing the circle, the badge or the stack by hand: the Bridge apps do it in over 100 places.
standalone).The look comes from props
A component's appearance comes only from its own options (variant, size, color). className on a package component is for layout (mt-4, shrink-0, w-full), never for font size, color, padding, radius or hover. If the look needs a className, the component or the chosen option is wrong: fix that instead.
Circle. One of six sizes. Light blue (--info-bg) shows through until a photo covers it.
Photo or initials. The photo, cropped to fill. With no photo, while it loads, or if it fails: one or two bold letters in blue (--info), from the first and last word of the name.
Badge. Optional, bottom right, ringed in the page color: a blue tick, a purple award or an amber “!”. Not shown at 16px.
The usual place. Screen readers hear the name once, then the badge.
Marcus Bell
General Partner, Lanternfield Capital · Super Connector
Leah Okonkwo
Partner, Saltmarsh Partners · Bridge member
Priya Natarajan
Co-founder & CEO, Quillbase · Bridge member
Kwame Asante
CEO, Halcyra Bio · Not on Bridge
Hannah Weiss
Angel investor · Emails to her are failing
A Bridge member, a Super Connector (the award replaces the tick), and an account whose emails are failing.
Three faces, then a count. When the names are written beside it, the stack stays silent for screen readers.
7 people can introduce you
to Quillbase
Marcus Bell, Leah Okonkwo
Pick the size for the place, never by eye. No badge at 16px.
With no photo, or a photo that fails to load, the initials show. Nothing is ever blank or broken.
| State | What happens |
|---|---|
| Photo | The photo fills the circle. |
| Loading | Initials show until the photo arrives, so nothing is ever blank. |
| No photo | Initials on light blue. |
| Photo failed | Initials stay. A broken image never shows. |
xs 16px in chips, sm 24px in stacks, md 32px in lists (the default), lg 40px in rows, xl 48px on cards, 2xl 64px in profile headers.member is a blue tick for a Bridge member. super-connector is a purple award and replaces the tick, since every Super Connector is a member. warning is an amber “!” when the account is deactivated or its emails are failing.max) at 24px, each tucked a little under the one before, then a grey “+N” circle for the rest.className is for layout only (mt-0.5). Never a size, color or shape.Do
Pass the person's name, photo URL and badge, and let Avatar handle the rest.Don't
Write your owninitials(), a styled <span>, or an absolutely placed tick.Do
Use one badge: the award for a Super Connector, the tick for any other member.Don't
Show both the tick and the award on the same person.Do
Pick the size for the place:sm in a stack, md in a list, xl on a card.Don't
Setsize-10 or h-11 w-11 by eye.standalone: it's read as the name and badge, like “Leah Okonkwo, Bridge member”.decorative when the names are written beside it.--info on --info-bg: 7.6:1 in light, above 5:1 on every dark surface. Each badge's white mark passes 3:1 in both themes.Avatar
A person's photo or initials, with an optional badge.
| Prop | Type | Default | Description |
|---|---|---|---|
name | string | null | — | The person's name. Gives the initials, and the spoken name when standalone. |
src | string | null | — | Photo URL. Empty shows the initials. |
size | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "md" | 16, 24, 32, 40, 48 or 64px. |
badge | "member" | "super-connector" | "warning" | null | — | The corner mark. Not shown at xs. |
standalone | boolean | false | Set when no name shows next to it, so screen readers hear who it is. |
className | string | — | Layout only: mt-0.5. |
AvatarGroup
A few faces, overlapping, then “+N”.
| Prop | Type | Default | Description |
|---|---|---|---|
people | { name, src? }[] | — | Everyone in the group, in order. The first ones show. |
max | number | 3 | How many faces show before “+N”. |
size | same as Avatar | "sm" | Stacks are usually 24px. |
decorative | boolean | false | Set when the names are written next to the stack. |
className | string | — | Layout only. |
initialsOf
The same initials as text, for places that need the letters without the circle.
| Prop | Type | Default | Description |
|---|---|---|---|
name | string | null | — | “Priya Natarajan” gives “PN”. |
What it's built from and where it's used, read from the code. When you change it, check these too.