Marketing sectionsTeamGrid
Searchastronomic.dev# TeamGrid
To introduce the people behind the work, each with a large photo, name and role.
Static: no JavaScript.
## Usage
```astro
import TeamGrid from "@astronomic-dev/ui/components/TeamGrid.astro";
```
## Examples
### The studio
Six people on the open page, each a large 4:5 photo over the name and role. As many columns as fit, each at least 18rem: one on a phone, two from about 37rem, three in a wide row, so six people make two full rows. Two have no photo, so their initials show large in the same box and the row never breaks.
```astro
---
import TeamGrid from "@astronomic-dev/ui/components/TeamGrid.astro";
// Your own photos. Sam and Mira have none yet: their initials show in the same box.
import ada from "../../photos/portrait-curly-hair.webp";
import lena from "../../photos/portrait-glasses.webp";
import jonas from "../../photos/portrait-grey-hair.webp";
import tomas from "../../photos/portrait-smiling.webp";
const people = [
{ name: "Ada Brook", role: "Founder and design lead", image: { src: ada } },
{ name: "Sam Okafor", role: "Lead developer" },
{ name: "Lena Ruiz", role: "Content strategist", image: { src: lena } },
{ name: "Tomás Vidal", role: "Project manager", image: { src: tomas } },
{ name: "Mira Chen", role: "Designer" },
{ name: "Jonas Weber", role: "Developer", image: { src: jonas } },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<TeamGrid heading="The people behind Astronomic" text="Six of us plan, design and build every site, from the first call to the handover." items={people} />
</div>
```
### In a narrow column
Four people in a 24rem column: one per row; a long name and role wrap inside the box when they need to, never past it.
```astro
---
import TeamGrid from "@astronomic-dev/ui/components/TeamGrid.astro";
import { displayType } from "@astronomic-dev/ui/lib/display.ts";
import ada from "../../photos/portrait-curly-hair.webp";
import jonas from "../../photos/portrait-grey-hair.webp";
const people = [
{ name: "Ada Brook", role: "Founder and design lead", image: { src: ada } },
{ name: "Maximiliane Oberhauser-Lindqvist", role: "Head of accessibility and content migration" },
{ name: "Sam Okafor", role: "Lead developer" },
{ name: "Jonas Weber", role: "Developer", image: { src: jonas } },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<div data-narrow class="grid max-w-sm gap-blocks">
<h2 class={`m-0 text-title text-balance ${displayType}`}>In a narrow column</h2>
<TeamGrid items={people} />
</div>
</div>
```
### With their own pages
Three people, each with href: the name is the card's one link, stretched over the card, so a click on the photo opens the page too and the focus ring goes round the card. Their own links sit above it, still clicked and tabbed to on their own.
```astro
---
import TeamGrid from "@astronomic-dev/ui/components/TeamGrid.astro";
// Each person has a page of their own (href): the name is the card's one link, stretched over the card. Their own
// links sit above it.
import ada from "../../photos/portrait-curly-hair.webp";
import lena from "../../photos/portrait-glasses.webp";
import tomas from "../../photos/portrait-smiling.webp";
const people = [
{ name: "Ada Brook", role: "Founder and design lead", href: "#ada-brook", image: { src: ada }, links: [{ label: "LinkedIn", href: "#ada-linkedin" }, { label: "Email", href: "mailto:ada@example.com" }] },
{ name: "Lena Ruiz", role: "Content strategist", href: "#lena-ruiz", image: { src: lena } },
{ name: "Tomás Vidal", role: "Project manager", href: "#tomas-vidal", image: { src: tomas }, links: [{ label: "LinkedIn", href: "#tomas-linkedin" }] },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<TeamGrid heading="Meet the team" text="Each of us has a page: open a card to read about their work." items={people} />
</div>
```
### Your own images
Astro's <Image> draws each photo (imageComponent={Image}), with no wrapper; the kit draws the frame and passes a sizes hint for this layout. Astro writes a srcset when your astro.config sets image.layout. For EmDash or another CMS, see "Your own images" in the kit README.
```astro
---
import TeamGrid from "@astronomic-dev/ui/components/TeamGrid.astro";
// Astro's <Image> draws each photo, with no wrapper; TeamGrid passes it a sizes hint for its columns.
// For a srcset, set image: { layout: "constrained" } in your astro.config.
import { Image } from "astro:assets";
// Your own photos. Sam and Mira have none yet: their initials show in the same box.
import ada from "../../photos/portrait-curly-hair.webp";
import lena from "../../photos/portrait-glasses.webp";
import jonas from "../../photos/portrait-grey-hair.webp";
import tomas from "../../photos/portrait-smiling.webp";
const people = [
{ name: "Ada Brook", role: "Founder and design lead", image: { src: ada } },
{ name: "Sam Okafor", role: "Lead developer" },
{ name: "Lena Ruiz", role: "Content strategist", image: { src: lena } },
{ name: "Tomás Vidal", role: "Project manager", image: { src: tomas } },
{ name: "Mira Chen", role: "Designer" },
{ name: "Jonas Weber", role: "Developer", image: { src: jonas } },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<TeamGrid heading="The people behind Astronomic" text="Six of us plan, design and build every site, from the first call to the handover." items={people} imageComponent={Image} />
</div>
```
## Props
### TeamGrid
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `heading` | `string` | None | The section heading, in the title role in display type. Without it there is no section and no header: a plain <div> holds only the people. |
| `emphasis` | `boolean` | `false` | Turn one *phrase* in the heading into <em>: exactly two asterisks around text with no space inside, as in "Built for *the long run*". Any other asterisks show as typed. Off by default, so the heading shows as typed. How the <em> looks is the theme's. |
| `mark` | `string` | None | A short mark after the heading, such as "(12)" or "©2026", in small muted type. It sits beside the heading, outside it, so the heading's name stays plain. Shown only with a heading. |
| `markLabel` | `string` | None | What the mark says to a screen reader, such as "12 projects": the mark is then hidden from screen readers and this is read in its place. Without it, the mark is read as written. |
| `text` | `string` | None | One or two sentences under the heading, in the lead role, muted. Shown only with a heading. |
| `headingTag` | `"h2" \| "h3" \| "h4"` | `"h2"` | The heading element. Each name sits one level under it. |
| `class` | `string` | None | More classes for the root (the <section>, or the <div> without a heading), merged with cn(), so yours win on conflicts. The root is a named size container (inline-size containment): in a shrink-to-fit parent (inline-flex, a float, fit-content) it collapses, so give it a width there. |
| `itemHeadingTag` | `"h2" \| "h3" \| "h4" \| "h5"` | `"h3"` | The name element when there is no heading. With a heading, names sit one level under it. |
| `items` | `TeamMemberItem[]` | None | Required. The people, in order: { name, role, href?, image?, bio?, links?, quote? } (TeamMemberItem). href is the person's own page: their name becomes the card's one link. image is { src, width?, height?, focalPoint?, loading? }, with no alt: the part writes alt="", since the name is under it. links are { label, href, icon? }. Only these fields reach each person, so a CMS entry's other fields never reach the page. An empty list renders an empty list: leave the section out when there are none. The quote is not shown here (TeamSpotlight shows it). |
| `imageComponent` | `ImageComponent` | None | Your image component, for every photo: Astro's <Image>, or a small wrapper for your CMS. The recipe passes a sizes hint for its columns, for the number of items (one: (min-width: 80rem) 77rem, 100vw; two: (min-width: 80rem) 38rem, (min-width: 40rem) 50vw, 100vw; three or more: (min-width: 80rem) 25rem, (min-width: 60rem) 33vw, (min-width: 40rem) 50vw, 100vw, gridImageSizes in lib/image.ts). See the own-images example and "Your own images" in the kit README. |
| Slot | Description |
| --- | --- |
| `eyebrow` | A short line above the heading, such as a Badge. Shown only with a heading. |
Any other attribute goes on the <section>, or on the <div> without a heading.
## Accessibility
- With a heading, renders a <section> named by it, so it is a region landmark. The heading id is unique on the page.
- Without a heading, renders a plain <div>. Put your own heading above it.
- The people are a list (<ul role="list">), so a screen reader says how many there are. With no people the list is still there, empty: leave the section out when there are none.
- Each name sits one level under the section heading (h2 gives h3), so a reader can jump from person to person. With no heading, it is an h3 unless you set itemHeadingTag.
- A photo has empty alt text, since the name is right under it. Without a photo, the initials show in the same box and are hidden from screen readers.
- Each link is read with the person's name, such as "Ada Brook on LinkedIn", so a list of links on the page never reads "LinkedIn, LinkedIn, LinkedIn".
TeamGrid
FreeTo introduce the people behind the work, each with a large photo, name and role.
- File
- TeamGrid.astro
- Group
- Marketing sections
- Kind
- Static: no JavaScript
- Examples
- 4
Examples
Drag the orange handle to set the width. Frames get real breakpoints.
- Static
- Interactive
- Framed
The studio
Six people on the open page, each a large 4:5 photo over the name and role. As many columns as fit, each at least 18rem: one on a phone, two from about 37rem, three in a wide row, so six people make two full rows. Two have no photo, so their initials show large in the same box and the row never breaks.
This preview did not load.
examples/teamgrid/main.astro
---
import TeamGrid from "@astronomic-dev/ui/components/TeamGrid.astro";
// Your own photos. Sam and Mira have none yet: their initials show in the same box.
import ada from "../../photos/portrait-curly-hair.webp";
import lena from "../../photos/portrait-glasses.webp";
import jonas from "../../photos/portrait-grey-hair.webp";
import tomas from "../../photos/portrait-smiling.webp";
const people = [
{ name: "Ada Brook", role: "Founder and design lead", image: { src: ada } },
{ name: "Sam Okafor", role: "Lead developer" },
{ name: "Lena Ruiz", role: "Content strategist", image: { src: lena } },
{ name: "Tomás Vidal", role: "Project manager", image: { src: tomas } },
{ name: "Mira Chen", role: "Designer" },
{ name: "Jonas Weber", role: "Developer", image: { src: jonas } },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<TeamGrid heading="The people behind Astronomic" text="Six of us plan, design and build every site, from the first call to the handover." items={people} />
</div>In a narrow column
Four people in a 24rem column: one per row; a long name and role wrap inside the box when they need to, never past it.
This preview did not load.
examples/teamgrid/narrow.astro
---
import TeamGrid from "@astronomic-dev/ui/components/TeamGrid.astro";
import { displayType } from "@astronomic-dev/ui/lib/display.ts";
import ada from "../../photos/portrait-curly-hair.webp";
import jonas from "../../photos/portrait-grey-hair.webp";
const people = [
{ name: "Ada Brook", role: "Founder and design lead", image: { src: ada } },
{ name: "Maximiliane Oberhauser-Lindqvist", role: "Head of accessibility and content migration" },
{ name: "Sam Okafor", role: "Lead developer" },
{ name: "Jonas Weber", role: "Developer", image: { src: jonas } },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<div data-narrow class="grid max-w-sm gap-blocks">
<h2 class={`m-0 text-title text-balance ${displayType}`}>In a narrow column</h2>
<TeamGrid items={people} />
</div>
</div>With their own pages
Three people, each with href: the name is the card's one link, stretched over the card, so a click on the photo opens the page too and the focus ring goes round the card. Their own links sit above it, still clicked and tabbed to on their own.
This preview did not load.
examples/teamgrid/linked.astro
---
import TeamGrid from "@astronomic-dev/ui/components/TeamGrid.astro";
// Each person has a page of their own (href): the name is the card's one link, stretched over the card. Their own
// links sit above it.
import ada from "../../photos/portrait-curly-hair.webp";
import lena from "../../photos/portrait-glasses.webp";
import tomas from "../../photos/portrait-smiling.webp";
const people = [
{ name: "Ada Brook", role: "Founder and design lead", href: "#ada-brook", image: { src: ada }, links: [{ label: "LinkedIn", href: "#ada-linkedin" }, { label: "Email", href: "mailto:ada@example.com" }] },
{ name: "Lena Ruiz", role: "Content strategist", href: "#lena-ruiz", image: { src: lena } },
{ name: "Tomás Vidal", role: "Project manager", href: "#tomas-vidal", image: { src: tomas }, links: [{ label: "LinkedIn", href: "#tomas-linkedin" }] },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<TeamGrid heading="Meet the team" text="Each of us has a page: open a card to read about their work." items={people} />
</div>Your own images
Astro's <Image> draws each photo (imageComponent={Image}), with no wrapper; the kit draws the frame and passes a sizes hint for this layout. Astro writes a srcset when your astro.config sets image.layout. For EmDash or another CMS, see "Your own images" in the kit README.
This preview did not load.
examples/teamgrid/own-images.astro
---
import TeamGrid from "@astronomic-dev/ui/components/TeamGrid.astro";
// Astro's <Image> draws each photo, with no wrapper; TeamGrid passes it a sizes hint for its columns.
// For a srcset, set image: { layout: "constrained" } in your astro.config.
import { Image } from "astro:assets";
// Your own photos. Sam and Mira have none yet: their initials show in the same box.
import ada from "../../photos/portrait-curly-hair.webp";
import lena from "../../photos/portrait-glasses.webp";
import jonas from "../../photos/portrait-grey-hair.webp";
import tomas from "../../photos/portrait-smiling.webp";
const people = [
{ name: "Ada Brook", role: "Founder and design lead", image: { src: ada } },
{ name: "Sam Okafor", role: "Lead developer" },
{ name: "Lena Ruiz", role: "Content strategist", image: { src: lena } },
{ name: "Tomás Vidal", role: "Project manager", image: { src: tomas } },
{ name: "Mira Chen", role: "Designer" },
{ name: "Jonas Weber", role: "Developer", image: { src: jonas } },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<TeamGrid heading="The people behind Astronomic" text="Six of us plan, design and build every site, from the first call to the handover." items={people} imageComponent={Image} />
</div>