# AvatarGroup

A compact collection of avatars with an accessible overflow count.

Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.

## Example

```tsx
"use client";

import { FloodRoot, AvatarGroup } from "@flood-md/react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <AvatarGroup label="Project collaborators" items={[{id:"alex",name:"Alex Morgan"},{id:"sam",name:"Sam Lee"},{id:"june",name:"June Park"}]} max={2} />
    </FloodRoot>
  );
}
```

## Design notes

- The native list composes Flood Avatar. IDs and names must be nonempty and unique IDs remain stable. max is a positive integer; the default shows four people.
- Overflow is a static count, not a hidden interactive menu. Translate overflowLabel when needed; visible avatars retain their individual accessible names. Size follows Avatar. Intentional overlap never applies to interactive targets.
- Compatible addition in 0.2.5. Uses existing Flood semantic tokens and relative geometry.

## API reference

| Prop | Values | Default |
| --- | --- | --- |
| `items` | `readonly AvatarGroupItem[]` | `Required` |
| `label` | `string` | `Required` |
| `max` | `number` | `4` |
| `size` | `"sm" \| "md" \| "lg"` | `"md"` |
| `overflowLabel` | `string` | `—` |
| `Native HTML props` | `Omit<HTMLAttributes<HTMLUListElement>, "children">` | `Forwarded` |
