Avatar
A person or workspace, as an image with an initials fallback — alone, stacked, or wearing a status dot.
Image and fallback
The fallback is initials, never an illustrated face — and never an emoji.
Usage
import {
Avatar,
AvatarBadge,
AvatarFallback,
AvatarGroup,
AvatarGroupCount,
AvatarImage,
} from '@oceanic-hub/brand-system'<Avatar>
<AvatarImage>…</AvatarImage>
<AvatarFallback>…</AvatarFallback>
</Avatar>Composition
Use the following composition to build an Avatar:
Avatar
├── AvatarImage
├── AvatarFallback
└── AvatarBadge
AvatarGroup
├── Avatar
│ └── AvatarFallback
└── AvatarGroupCountAlways give AvatarFallback real initials: the image is the optimistic path and
it will fail. No illustrated faces, no emoji, no stock photography.
AvatarGroup and AvatarGroupCount are Oceanic additions (@OCE-1749), not a port — the
classic shadcn generation this component is built on ships only Avatar, AvatarImage and
AvatarFallback. Reach for the group when a surface needs to show WHO, not just how many: a
stack of owners on a deal, a list of reviewers on a doc. Each avatar rings itself against the
canvas rather than casting a shadow, and AvatarGroupCount closes the stack with the overflow
as plain ink, not another avatar pretending to be one.
shape is a fourth Oceanic addition, and it encodes a rule rather than a taste: a circle is a
person, a square is an organization. Default is circle, so a people-only surface changes
nothing. It is a prop and not a className for two reasons worth knowing. The rule is the same
on every surface, so a convention would be re-derived per screen and enforced nowhere; and the
radius has to reach the ROOT, the IMAGE and the FALLBACK — three elements a call site cannot
round from outside — so it propagates by context from the root, which is also what stops the
image and the fallback disagreeing while a portrait loads. The square's step is 8px at every
plate size on purpose: CSS scales a corner down when it exceeds half the box, so 12px resolves to
a full circle on anything 24px or smaller, and a shape prop that quietly returns a circle in a
dense row would be worse than no prop. A large plate that wants a softer corner passes
rounded-lg in className.
The monogram is sans, bold, uppercase, no letter-spacing, sized to the plate. It used to be
mono with 0.2em tracking, and that tracking is applied after the last glyph as well as between
glyphs — so a two-letter monogram sat left of centre in a plate centred by justify-center. Size
it the way you size the plate itself: with className, since there is no size prop for either.
AvatarBadge is also ours: a presence or status dot for an avatar's corner, built on the same
status roles every other status surface in this package uses rather than inventing a vocabulary
of its own. Never ship a badge without a label: a dot is a bare colour, and a bare colour
states nothing to a reader who cannot see it.
Not shown: an icon inside the badge or the count. At 10px the badge is sized to read as a dot, not a glyph, and the tones are already differentiated by hue alone — a state a reader with a colour vision deficiency cannot resolve today (see the component's own doctrine note). A glyph would close that gap; it is a real fix and not this pass's to make.
Upstream's Dropdown example — an Avatar as a DropdownMenu trigger — is not shown either:
nothing about it is Avatar-specific, so a demo here would repeat DropdownMenu's own page
rather than teach anything new.
RTL is not supported — recorded in pairings.json under direction: nothing in this
package has been laid out or measured right-to-left.
Group
AvatarGroup overlaps its children left to right and rings each one against the canvas — never a shadow — so a stack of owners reads as one shape. AvatarGroupCount closes it with the overflow as plain ink.
Status badge
AvatarBadge marks a corner with one of the package's five status roles. label is required — a dot with no accessible name states nothing to a reader who cannot see its colour.
Sizes
Four sizes on the doctrine's scale — sm 24px, the 32px default, lg 40px, xl 56px — set by className, never a size prop: an avatar in a dense table row and one in a header are the same component.
Shape
shape says what the plate is a plate OF: a circle is a person, a square is an organization. It is a prop and not a className because the rule is the same on every surface — and because the radius has to reach the root, the image and the fallback, which are three elements a call site cannot round from outside. The square's step is 8px across every plate size: 12px resolves to a full circle on anything 24px or smaller.
API Reference
See the Avatar API page for every prop of every part, with types, defaults and the contract that pins them.