# TeamBlock

> Centred team grid of member cards: an Avatar, the name and the role, plus avatar-size, column and spacing knobs.

- Status: stable
- Group: structure
- Page: https://www.digitaltableteur.com/design-system/components/team-block
- Contract: https://www.digitaltableteur.com/contracts/v1/TeamBlock.contract.json

## When to use

TeamBlock renders a team/people grid: member cards with an Avatar (photo or initials), name and role, plus avatarSize, column and spacing knobs, under a section title and optional description. sectionTitle defaults to the translated "Team" label (projectTeamLabel); pass an empty string to omit the heading. Rows with fewer members than columns stay centred. A member with link renders as an anchor that keeps the column sizing, opens in a new tab and ends its name with the translated "(opens in a new tab)". No production page renders TeamBlock today; HelsinkiDesignSystemPage imports it without rendering it.

## When not to use

The contract records no forbidden uses.

## Look-alikes

The contract names no look-alike with a deciding condition.

## Props

| Prop | Type | Default | Description | Required |
| --- | --- | --- | --- | --- |
| `members` | `TeamMember[]` | none | Array of team members to display. | Yes |
| `sectionTitle` | `string` | none | Section title. Defaults to the translated "Team" label (projectTeamLabel); pass "" to omit it. | No |
| `description` | `React.ReactNode` | none | Optional description or introduction text. | No |
| `columns` | `2 \| 3 \| 4 \| 5 \| 6` | `5` | Number of columns for desktop layout (2-6) | No |
| `backgroundColor` | `"transparent" \| "light" \| "white"` | `transparent` | Background color variant. | No |
| `maxWidth` | `"sm" \| "md" \| "lg" \| "full" \| "xl"` | `lg` | Maximum width constraint. | No |
| `spacing` | `"compact" \| "default" \| "comfortable" \| "spacious"` | `comfortable` | Spacing variant. | No |
| `className` | `string` | `""` | Additional CSS class. | No |
| `as` | `"article" \| "div" \| "section"` | `section` | Semantic HTML element to use. | No |
| `ariaLabel` | `string` | none | Accessible label for the section; falls back to sectionTitle. | No |
| `avatarSize` | `string` | none | Avatar diameter as any CSS length (default 7rem) | No |

## Variants

- Allowed `columns` values: `2`, `3`, `4`, `5`, `6` (default `5`).
- Allowed `backgroundColor` values: `transparent`, `light`, `white` (default `transparent`).
- Allowed `maxWidth` values: `sm`, `md`, `lg`, `full`, `xl` (default `lg`).
- Available spacings: `compact`, `default`, `comfortable`, `spacious` (default `comfortable`).
- Allowed `as` values: `article`, `div`, `section` (default `section`).

## Invalid combinations

The contract records no invalid combinations.

## Keyboard

The contract records no keyboard interaction.

## Rules

Every item under When not to use is a MUST NOT. MUST and SHOULD follow RFC 2119.

| Level | Rule | How it is checked |
| --- | --- | --- |
| MUST | ARIA: The section is named by aria-label from ariaLabel, falling back to sectionTitle (default: the translated projectTeamLabel, "Team" in English). | Not yet verified: no evidence record. WCAG 4.1.2. |
| MUST | ARIA: Avatars render with alt="" because each member name follows as an h3. | Not yet verified: no evidence record. WCAG 4.1.2. |
| MUST | Required stories produce no axe violations at the configured severity. | Automated by `npm run test:stories:matrix:ci`. WCAG 2.5.8. |
| MUST | The accessibility tree (role, name, state) matches the committed snapshot for every required story. | Automated by `npm run test:stories:matrix:ci`. WCAG 1.3.1, 4.1.2. |
| MUST | The component remains legible and operable under a real browser forced-colors: active pass. | Automated by `npm run test:stories:hc`. |
| MUST | A human completed an end-to-end accessibility review of this component. | Manual review, last on 2026-11-04. |
| MUST NOT | Maintainers: Do not bypass design tokens or skip forced-colors verification at beta. | Release review; not machine-checked. |

## Install and import

- In-repo only. TeamBlock is not exported from `@digitaltableteur/react`, so there is no public import path.

## Links

- Machine-readable contract (Design System Contract 1.0): https://www.digitaltableteur.com/contracts/v1/TeamBlock.contract.json
- Markdown version of this page: https://www.digitaltableteur.com/design-system/components/team-block.md
- Component index as JSON: https://www.digitaltableteur.com/design-system/components.json
- All components: https://www.digitaltableteur.com/design-system/components
- Source: The implementation lives in a private repository. This page, its Markdown twin and the contract are generated from it at build time and are the public source of truth.
