# TeamGrid

Responsive grid of person cards with avatar, role, bio and social links

> Component ID: `team-grid`
> Import: `import { TeamGrid } from '@slipstream-ui/core'`
> Docs: https://slipstreamui.com/docs/components/team-grid
> Registry: https://slipstreamui.com/registry/team-grid.json
> Tier: organism · Package: @slipstream-ui/core@0.16.0
> Manifest schema: v1 · manifest: v1

## Design intent

TeamGrid renders about/team pages: a responsive card grid where each member gets an avatar (Avatar fallback chain or a composed node), name, role, optional bio and SocialLinks. A member href links their identity block (social links stay valid siblings, never nested), and linkComponent/linkHrefProp keep it router-aware.

## Props

| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
| members | `TeamMember[]` | — | yes | People to render: name, role, bio, href, avatarSrc, avatar, social |
| columns | `2 | 3 | 4` | `3` | no | Columns at lg and up; the grid always stacks to one column on small screens |
| label | `string` | `Team` | no | Accessible name for the grid region |
| linkComponent | `ElementType` | — | no | Router link element for member hrefs (Next Link, react-router Link) |
| linkHrefProp | `'href' | 'to'` | `'href'` | no | Prop carrying the destination on linkComponent |
| className | `string` | — | no | Additional CSS classes to apply |

## Examples

### Leadership grid

Avatar fallback chain, linked card and social links

```tsx
<TeamGrid
  columns={3}
  members={[
    {
      name: 'Ada Lovelace',
      role: 'CTO',
      bio: 'Built the first compiler.',
      avatarSrc: '/ada.jpg',
      href: '/team/ada',
      social: [{ href: 'https://github.com/ada', label: 'GitHub' }],
    },
    { name: 'Grace Hopper', role: 'VP Engineering' },
  ]}
/>
```

## Anti-patterns

- **Don't wrap the card in another link** — member.href already links the identity block. Wrapping the whole card in an anchor would nest interactive elements.
- **Don't use for non-person collections** — TeamGrid is person cards. For articles use ArticleCard; for generic entities use EntityCard.

## Accessibility

- **List semantics**: Renders role=list with labelled region and role=listitem per card
- **Avatar fallbacks**: AvatarImage + AvatarFallback initials mean members without photos still render a named, non-empty avatar
- **Single link target**: member.href links the identity block with a visible focus ring; social links render as siblings so anchors never nest

## Composition

- Compose with **Avatar** — avatarSrc renders through Avatar internally; member.avatar accepts a fully composed Avatar for custom fallbacks
  
  ```tsx
  avatar: <Avatar><AvatarImage src="/a.jpg"/><AvatarFallback>AL</AvatarFallback></Avatar>
  ```
- Compose with **SocialLinks** — member.social renders through SocialLinks with per-member landmark labels
  
  ```tsx
  social: [{ href: 'https://github.com/ada', label: 'GitHub' }]
  ```
- Related: Avatar, SocialLinks, EntityCard, ArticleCard

