Composite
Team
People cards with a photo, name, role and social links, in two to four columns.
A grid of person cards: photo, name, role, bio and social links. Team is a preset over ItemsGrid, so every member is an Item: the name is title, the role and bio are content (HTML), the photo is image and the links are actions.
Basic
Names render as h3 headings and photos are decorative (alt=""), because the name sits right next to them. Icon-only links have no visible text, so give each one an aria-label naming the person, such as “Ana on LinkedIn”.
---
import Team from '@alfadormx/blocks/composite/Team.astro';
import type { ButtonProps } from '@alfadormx/blocks/types/button';
import type { TeamMember } from '@alfadormx/blocks/types/team';
const photo = (id: string) => ({
src: `https://images.unsplash.com/${id}?w=320&h=320&fit=crop&crop=faces`,
});
const NETWORK_ICONS = {
LinkedIn: 'mdi:linkedin',
GitHub: 'mdi:github',
Email: 'heroicons:envelope',
} as const;
const link = (first: string, network: keyof typeof NETWORK_ICONS, href: string): ButtonProps => ({
icon: { name: NETWORK_ICONS[network] },
href,
'aria-label': `${first} on ${network}`,
});
const member = (
name: string,
role: string,
bio: string,
id: string,
links: ButtonProps[]
): TeamMember => ({
title: name,
content: `<p class="text-sm text-muted">${role}</p><p class="mt-2">${bio}</p>`,
image: photo(id),
actions: links,
});
const people: TeamMember[] = [
member(
'Ana Ruiz',
'Head of Product',
'Turns customer interviews into roadmaps.',
'photo-1494790108377-be9c29b29330',
[
link('Ana', 'LinkedIn', 'https://www.linkedin.com/'),
link('Ana', 'GitHub', 'https://github.com/'),
]
),
member(
'Ben Okafor',
'Lead Engineer',
'Keeps the build fast and the pages light.',
'photo-1507003211169-0a1dd7228f2d',
[link('Ben', 'GitHub', 'https://github.com/'), link('Ben', 'Email', 'mailto:ben@example.com')]
),
member(
'Chloé Martin',
'Design Lead',
'Owns the design system and its tokens.',
'photo-1438761681033-6461ffad8d80',
[
link('Chloé', 'LinkedIn', 'https://www.linkedin.com/'),
link('Chloé', 'Email', 'mailto:chloe@example.com'),
]
),
];
---
<Team members={people} />Square photos
imageShape="square" crops the photos to squares with rounded corners.
---
import Team from '@alfadormx/blocks/composite/Team.astro';
import type { ButtonProps } from '@alfadormx/blocks/types/button';
import type { TeamMember } from '@alfadormx/blocks/types/team';
const photo = (id: string) => ({
src: `https://images.unsplash.com/${id}?w=320&h=320&fit=crop&crop=faces`,
});
const NETWORK_ICONS = {
LinkedIn: 'mdi:linkedin',
GitHub: 'mdi:github',
Email: 'heroicons:envelope',
} as const;
const link = (first: string, network: keyof typeof NETWORK_ICONS, href: string): ButtonProps => ({
icon: { name: NETWORK_ICONS[network] },
href,
'aria-label': `${first} on ${network}`,
});
const member = (
name: string,
role: string,
bio: string,
id: string,
links: ButtonProps[]
): TeamMember => ({
title: name,
content: `<p class="text-sm text-muted">${role}</p><p class="mt-2">${bio}</p>`,
image: photo(id),
actions: links,
});
const people: TeamMember[] = [
member(
'Ana Ruiz',
'Head of Product',
'Turns customer interviews into roadmaps.',
'photo-1494790108377-be9c29b29330',
[
link('Ana', 'LinkedIn', 'https://www.linkedin.com/'),
link('Ana', 'GitHub', 'https://github.com/'),
]
),
member(
'Ben Okafor',
'Lead Engineer',
'Keeps the build fast and the pages light.',
'photo-1507003211169-0a1dd7228f2d',
[link('Ben', 'GitHub', 'https://github.com/'), link('Ben', 'Email', 'mailto:ben@example.com')]
),
member(
'Chloé Martin',
'Design Lead',
'Owns the design system and its tokens.',
'photo-1438761681033-6461ffad8d80',
[
link('Chloé', 'LinkedIn', 'https://www.linkedin.com/'),
link('Chloé', 'Email', 'mailto:chloe@example.com'),
]
),
];
---
<Team members={people} imageShape="square" />Two columns
columns sets the column count at the widest size; it steps down when narrower.
---
import Team from '@alfadormx/blocks/composite/Team.astro';
import type { ButtonProps } from '@alfadormx/blocks/types/button';
import type { TeamMember } from '@alfadormx/blocks/types/team';
const photo = (id: string) => ({
src: `https://images.unsplash.com/${id}?w=320&h=320&fit=crop&crop=faces`,
});
const NETWORK_ICONS = {
LinkedIn: 'mdi:linkedin',
GitHub: 'mdi:github',
Email: 'heroicons:envelope',
} as const;
const link = (first: string, network: keyof typeof NETWORK_ICONS, href: string): ButtonProps => ({
icon: { name: NETWORK_ICONS[network] },
href,
'aria-label': `${first} on ${network}`,
});
const member = (
name: string,
role: string,
bio: string,
id: string,
links: ButtonProps[]
): TeamMember => ({
title: name,
content: `<p class="text-sm text-muted">${role}</p><p class="mt-2">${bio}</p>`,
image: photo(id),
actions: links,
});
const people: TeamMember[] = [
member(
'Ana Ruiz',
'Head of Product',
'Turns customer interviews into roadmaps.',
'photo-1494790108377-be9c29b29330',
[
link('Ana', 'LinkedIn', 'https://www.linkedin.com/'),
link('Ana', 'GitHub', 'https://github.com/'),
]
),
member(
'Ben Okafor',
'Lead Engineer',
'Keeps the build fast and the pages light.',
'photo-1507003211169-0a1dd7228f2d',
[link('Ben', 'GitHub', 'https://github.com/'), link('Ben', 'Email', 'mailto:ben@example.com')]
),
member(
'Chloé Martin',
'Design Lead',
'Owns the design system and its tokens.',
'photo-1438761681033-6461ffad8d80',
[
link('Chloé', 'LinkedIn', 'https://www.linkedin.com/'),
link('Chloé', 'Email', 'mailto:chloe@example.com'),
]
),
member(
'Dev Patel',
'Developer Advocate',
'Writes the guides and answers the questions.',
'photo-1500648767791-00dcc994a43e',
[
link('Dev', 'LinkedIn', 'https://www.linkedin.com/'),
link('Dev', 'GitHub', 'https://github.com/'),
]
),
];
---
<Team members={people} columns={2} />Four columns
---
import Team from '@alfadormx/blocks/composite/Team.astro';
import type { ButtonProps } from '@alfadormx/blocks/types/button';
import type { TeamMember } from '@alfadormx/blocks/types/team';
const photo = (id: string) => ({
src: `https://images.unsplash.com/${id}?w=320&h=320&fit=crop&crop=faces`,
});
const NETWORK_ICONS = {
LinkedIn: 'mdi:linkedin',
GitHub: 'mdi:github',
Email: 'heroicons:envelope',
} as const;
const link = (first: string, network: keyof typeof NETWORK_ICONS, href: string): ButtonProps => ({
icon: { name: NETWORK_ICONS[network] },
href,
'aria-label': `${first} on ${network}`,
});
const member = (
name: string,
role: string,
bio: string,
id: string,
links: ButtonProps[]
): TeamMember => ({
title: name,
content: `<p class="text-sm text-muted">${role}</p><p class="mt-2">${bio}</p>`,
image: photo(id),
actions: links,
});
const people: TeamMember[] = [
member(
'Ana Ruiz',
'Head of Product',
'Turns customer interviews into roadmaps.',
'photo-1494790108377-be9c29b29330',
[
link('Ana', 'LinkedIn', 'https://www.linkedin.com/'),
link('Ana', 'GitHub', 'https://github.com/'),
]
),
member(
'Ben Okafor',
'Lead Engineer',
'Keeps the build fast and the pages light.',
'photo-1507003211169-0a1dd7228f2d',
[link('Ben', 'GitHub', 'https://github.com/'), link('Ben', 'Email', 'mailto:ben@example.com')]
),
member(
'Chloé Martin',
'Design Lead',
'Owns the design system and its tokens.',
'photo-1438761681033-6461ffad8d80',
[
link('Chloé', 'LinkedIn', 'https://www.linkedin.com/'),
link('Chloé', 'Email', 'mailto:chloe@example.com'),
]
),
member(
'Dev Patel',
'Developer Advocate',
'Writes the guides and answers the questions.',
'photo-1500648767791-00dcc994a43e',
[
link('Dev', 'LinkedIn', 'https://www.linkedin.com/'),
link('Dev', 'GitHub', 'https://github.com/'),
]
),
];
---
<Team members={people} columns={4} />With a headline
headline renders a centred h2 above the members.
Team
The people behind the product
---
import Team from '@alfadormx/blocks/composite/Team.astro';
import type { ButtonProps } from '@alfadormx/blocks/types/button';
import type { TeamMember } from '@alfadormx/blocks/types/team';
const photo = (id: string) => ({
src: `https://images.unsplash.com/${id}?w=320&h=320&fit=crop&crop=faces`,
});
const NETWORK_ICONS = {
LinkedIn: 'mdi:linkedin',
GitHub: 'mdi:github',
Email: 'heroicons:envelope',
} as const;
const link = (first: string, network: keyof typeof NETWORK_ICONS, href: string): ButtonProps => ({
icon: { name: NETWORK_ICONS[network] },
href,
'aria-label': `${first} on ${network}`,
});
const member = (
name: string,
role: string,
bio: string,
id: string,
links: ButtonProps[]
): TeamMember => ({
title: name,
content: `<p class="text-sm text-muted">${role}</p><p class="mt-2">${bio}</p>`,
image: photo(id),
actions: links,
});
const people: TeamMember[] = [
member(
'Ana Ruiz',
'Head of Product',
'Turns customer interviews into roadmaps.',
'photo-1494790108377-be9c29b29330',
[
link('Ana', 'LinkedIn', 'https://www.linkedin.com/'),
link('Ana', 'GitHub', 'https://github.com/'),
]
),
member(
'Ben Okafor',
'Lead Engineer',
'Keeps the build fast and the pages light.',
'photo-1507003211169-0a1dd7228f2d',
[link('Ben', 'GitHub', 'https://github.com/'), link('Ben', 'Email', 'mailto:ben@example.com')]
),
member(
'Chloé Martin',
'Design Lead',
'Owns the design system and its tokens.',
'photo-1438761681033-6461ffad8d80',
[
link('Chloé', 'LinkedIn', 'https://www.linkedin.com/'),
link('Chloé', 'Email', 'mailto:chloe@example.com'),
]
),
];
---
<Team members={people} headline={{ tagline: 'Team', title: 'The people behind the product' }} />Link defaults
Links are ghost, neutral, small icon buttons by default. defaultMemberConfig.defaultActionConfig is one layer that restyles every link of every member.
---
import Team from '@alfadormx/blocks/composite/Team.astro';
import type { ButtonProps } from '@alfadormx/blocks/types/button';
import type { TeamMember } from '@alfadormx/blocks/types/team';
const photo = (id: string) => ({
src: `https://images.unsplash.com/${id}?w=320&h=320&fit=crop&crop=faces`,
});
const NETWORK_ICONS = {
LinkedIn: 'mdi:linkedin',
GitHub: 'mdi:github',
Email: 'heroicons:envelope',
} as const;
const link = (first: string, network: keyof typeof NETWORK_ICONS, href: string): ButtonProps => ({
icon: { name: NETWORK_ICONS[network] },
href,
'aria-label': `${first} on ${network}`,
});
const member = (
name: string,
role: string,
bio: string,
id: string,
links: ButtonProps[]
): TeamMember => ({
title: name,
content: `<p class="text-sm text-muted">${role}</p><p class="mt-2">${bio}</p>`,
image: photo(id),
actions: links,
});
const people: TeamMember[] = [
member(
'Ana Ruiz',
'Head of Product',
'Turns customer interviews into roadmaps.',
'photo-1494790108377-be9c29b29330',
[
link('Ana', 'LinkedIn', 'https://www.linkedin.com/'),
link('Ana', 'GitHub', 'https://github.com/'),
]
),
member(
'Ben Okafor',
'Lead Engineer',
'Keeps the build fast and the pages light.',
'photo-1507003211169-0a1dd7228f2d',
[link('Ben', 'GitHub', 'https://github.com/'), link('Ben', 'Email', 'mailto:ben@example.com')]
),
member(
'Chloé Martin',
'Design Lead',
'Owns the design system and its tokens.',
'photo-1438761681033-6461ffad8d80',
[
link('Chloé', 'LinkedIn', 'https://www.linkedin.com/'),
link('Chloé', 'Email', 'mailto:chloe@example.com'),
]
),
];
---
<Team
members={people}
defaultMemberConfig={{ defaultActionConfig: { variant: 'outline', intent: 'primary' } }}
/>API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| headline | HeadlineProps | — | Headline above the members; not rendered when omitted (default: { htmlTag: 'h2', align: 'center' }) |
| members | TeamMember[] | — | The people. Each renders as an Item with an h3 name (`titleTag: 'h3'`) and a decorative photo (`image.alt: ''`); give every link an `aria-label` naming the person, e.g. 'Ana on LinkedIn' |
| columns | 2 | 3 | 4 | 3 | Columns at the widest size; steps down with the container width (default: 3) |
| gap | 'none' | 'tight' | 'normal' | 'loose' | 'normal' | Space between members (default: 'normal') |
| imageShape | 'square' | 'circle' | 'circle' | Photo crop: round, or a square with rounded corners (default: 'circle') |
| fillLastRow | boolean | false | A lone member in the last row spans the full row (default: false) |
| defaultMemberConfig | LayerConfig<TeamMember> | — | Item props merged under every member, over the internal defaults (ghost, neutral, sm, rounded links in a centred row; use `defaultActionConfig` to restyle every link) |
| class | string | — | Classes on the grid |