Skip to content

Avatar Stack

Overlapping gradient initials avatars inside a glass pill with a dark “+N” overflow bubble and a count label; avatars lift on hover.

glass/ui/avatar-stack
Open ↗

Source

import { cn } from "@/lib/utils";

export interface AvatarStackProps {
  people?: string[];
  /** Max avatars before “+N”. */
  max?: number;
  size?: "sm" | "md";
  /** Optional label after the stack (e.g. “in this meeting”). */
  label?: string;
  className?: string;
}

const TONES = [
  "from-da-primary to-da-accent",
  "from-da-accent to-da-success",
  "from-da-danger to-da-primary",
  "from-da-warning to-da-danger",
  "from-da-success to-da-primary",
];

/** Overlapping gradient avatars inside a glass pill with a “+N” counter and optional label; hovering lifts an avatar. */
export function AvatarStack({
  people = ["Amara Diallo", "Leo Park", "Sofia Rossi", "Noah Klein", "Jin Park", "Priya Raman", "Tomás Herrera"],
  max = 4,
  size = "md",
  label = "in this meeting",
  className,
}: AvatarStackProps) {
  const shown = people.slice(0, max);
  const rest = people.length - shown.length;
  const s = size === "sm" ? "size-7 text-[10px]" : "size-9 text-xs";
  return (
    <span
      className={cn(
        "da-stroke inline-flex items-center gap-2 rounded-da-pill bg-da-surface py-1 pr-3 pl-1 shadow-da-sm backdrop-blur-da backdrop-saturate-150",
        className,
      )}
    >
      <ul className="flex -space-x-2" aria-label={`${people.length} people: ${people.join(", ")}`}>
        {shown.map((p, i) => (
          <li
            key={p}
            title={p}
            aria-hidden
            className={cn(
              "da-transition grid place-items-center rounded-full bg-gradient-to-br font-semibold text-da-primary-fg ring-2 ring-da-bg hover:z-10 hover:-translate-y-1",
              TONES[i % TONES.length],
              s,
            )}
          >
            {p
              .split(" ")
              .map((w) => w[0])
              .join("")}
          </li>
        ))}
        {rest > 0 && (
          <li aria-hidden className={cn("grid place-items-center rounded-full bg-da-fg font-semibold text-da-bg ring-2 ring-da-bg", s)}>
            +{rest}
          </li>
        )}
      </ul>
      {label && (
        <span aria-hidden className="text-sm font-medium text-da-muted-fg">
          <span className="text-da-fg">{people.length}</span> {label}
        </span>
      )}
    </span>
  );
}

export default AvatarStack;

modules/glass/ui/avatar-stack/index.tsx

Props

PropTypeDefaultDescription
peoplestring[]—Names.
maxnumber4Visible avatars.
size"sm" | "md""md"Size.
labelstring—Text after the count (empty hides).
classNamestring—Classes.

Other badge variants in Glass

Badge in other art directions

Badge

Mono uppercase label with ink stroke in 8 solid variants (status + brand colors), two sizes, optional square status dot and a tilted sticker mode.

BrutalistBadge

Counter Badge

Notification counter that wraps any element (icon button, avatar) and pins a ruled square count to its corner; caps at max+, dot mode, three tones, hidden at zero.

BrutalistBadge

Sticker Badge

Round SVG sticker badge: dashed scalloped edge, text running around a circular path, big center label, hard offset drop shadow and a slight tilt. Four solid tones, any size.

BrutalistBadge

Tag List

Editable tag field: color-cycling ruled chips with remove buttons inside a boxed input, Enter/comma to add, Backspace to remove last, quick-add suggestion chips and a max limit.

BrutalistBadge

Badge

Small tinted label (neutral, accent, success, warning, danger, outline) with optional status dot, live pulse, pill shape and mono mode for IDs and service names.

MinimalBadge

Kbd Hint

Keyboard shortcut hint made of raised keycaps: combos (⌘ K), sequences (G then I) and an optional action label. Symbols get spoken names for screen readers.

MinimalBadge

Severity Badge

Incident severity badge: four signal bars filled according to level (SEV1–SEV4) with a mono code and optional label, so color is never the only cue.

MinimalBadge

Status Badge

Service status pill (operational, degraded, major outage, maintenance, no data) with a colored dot that pulses during incidents; soft, outline and dot-only variants.

MinimalBadge

Badge

Square mono tag in four variants: hairline outline, ink solid, subtle gray and signal orange (for “New” only).

Mono CleanBadge

Index Counter

Editorial index counter “03 / 12” in mono with zero padding and an optional hairline progress bar — for galleries, slides and case-study chapters.

Mono CleanBadge

Kbd

Keyboard shortcut hint: square hairline key caps in mono, joined, with an optional muted action label — e.g. “⌘ K Search”.

Mono CleanBadge

Status Dot

Minimal status indicator: a 6px dot (filled, hollow or pulsing signal for “building”) followed by a mono uppercase label.

Mono CleanBadge

Badge

Compact 4px-radius label in six tones × three variants (soft, outline, solid), two sizes, optional leading icon.

Neo CorporateBadge

Delta Badge

KPI delta chip: arrow + signed percentage, green when the change is favourable and red otherwise (`invert` for metrics where down is good), optional “vs last month”.

Neo CorporateBadge

Filter Chips

Active-filter bar: “field: value” chips with a remove (×) button each, a result-count region and “Clear all”; announces removals.

Neo CorporateBadge

Status Badge

Invoice/payment lifecycle status pill with a colored dot: draft, sent, viewed, paid, partial, overdue, void.

Neo CorporateBadge

Badge

Soft rounded pill label in natural tints (sage, clay, sand, forest, sun, berry), two sizes, optional leading icon.

Organic SoftBadge

Impact Badge

Impact/effort rating shown as three leaves (filled up to the level) with a text label — used on reduction actions.

Organic SoftBadge

Scope Badge

GHG scope indicator: a leaf-shaped chip with the scope number (forest / sage / clay) and an optional label; title explains the scope.

Organic SoftBadge

Status Pill

Target/action progress pill with a soft pulsing dot for active states (on track, at risk, off track) and static ones (done, not started).

Organic SoftBadge

Badge

Rounded pastel pill badge in seven tones (peach, mint, lavender, butter, neutral, primary, danger) and two sizes, with optional emoji/icon or dot.

Soft FlatBadge

Label Tags

Editable label set: pastel tags (rotating colors) with round × buttons and a dashed “+ Add label” pill that becomes an inline input (Enter adds, Escape cancels).

Soft FlatBadge

Status Dot

Task status indicator: colored dot in a soft halo plus label (To do, In progress (pulsing), In review, Done, Blocked); compact dot-only mode keeps a hidden label.

Soft FlatBadge

Streak Badge

Gamified streak badge: flame + “12-day streak” on a butter pill and seven round weekday dots, peach with a check on active days.

Soft FlatBadge