Skip to content
nexubDesign System
v12.7.0

Components · Avatar

Avatar Group

StableAdded v0.0.1

Stacked group of avatars with overflow count.

import { AvatarGroup } from '@nexub/react';
View as Markdown

Playground

Props

spacing
TSX
<AvatarGroup max={3}>…</AvatarGroup>

Examples

Default

States

  • default
  • size="sm"
  • size="md"
  • size="xs"
  • size="lg"
  • size="xl"

Props

Props
PropTypeDefaultDescription
maxnumber—Maximum number of avatars shown before an overflow count is rendered.
size'sm' | 'md' | 'xs' | 'lg' | 'xl''md'Controls avatar dimensions for all children.
spacing'sm' | 'md' | 'lg''md'Controls the overlap amount between stacked avatars.
childrenrequiredReact.ReactNode—

Design tokens

Avatar Group reads these component tokens. Each one is unset by default and falls back to the semantic role it aliases, so nothing changes until you set it. Set one on any element to restyle every Avatar Group below it, and leave the roles other components share alone. See the three token tiers.

Avatar Group design tokens
TokenAliasesNotes
--avatar-bg--color-surface-container-high—
--avatar-fg--color-on-surface-muted—
--avatar-radius9999pxA circle.
CSS
/* One area of your app */
.checkout {
  --avatar-bg: var(--color-secondary);
}