Marketing sectionsTeam
Searchastronomic.dev# Team
To build your own team layout: a section heading and the people, each with a photo, name and role. For a ready layout, use TeamGrid or TeamSplit.
Static: no JavaScript.
## Usage
```astro
import Team from "@astronomic-dev/ui/components/Team.astro";
```
## Examples
### Slots
The section is a shell: the eyebrow, the heading and the text always show in that order, then the list of people in the default slot, one TeamMember in an <li> each. The shell sets the type and the gaps; the recipes lay out the list. TeamGrid and TeamSplit are recipes built on it, and Pro adds TeamList and TeamSpotlight. childHeadingTag() in lib/heading.ts gives the names' heading level.
```astro
---
import Badge from "@astronomic-dev/ui/components/Badge.astro";
import Team from "@astronomic-dev/ui/components/Team.astro";
import TeamMember from "@astronomic-dev/ui/components/TeamMember.astro";
import { childHeadingTag } from "@astronomic-dev/ui/lib/heading.ts";
// Your own photos.
import ada from "../../photos/portrait-curly-hair.webp";
import tomas from "../../photos/portrait-smiling.webp";
const heading = "The studio";
const people = [
{ name: "Ada Brook", role: "Founder and design lead", image: { src: ada } },
{ name: "Sam Okafor", role: "Lead developer" },
{ name: "Tomás Vidal", role: "Project manager", image: { src: tomas } },
];
// One level under the section heading: h2 gives h3.
const tag = childHeadingTag({ heading });
---
<div class="mx-auto max-w-6xl px-6 py-16">
<Team heading={heading} text="Three people who plan, design and build every Astronomic site." listClass="grid-cols-[repeat(auto-fit,minmax(min(100%,13rem),1fr))] gap-x-cards gap-y-blocks">
<Badge slot="eyebrow">People</Badge>
{
people.map((p) => (
<li class="grid min-w-0">
<TeamMember name={p.name} role={p.role} image={p.image} headingTag={tag} />
</li>
))
}
</Team>
</div>
```
## Props
### Team
| 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. |
| `align` | `"start" \| "center"` | `"start"` | For recipes. The alignment of the header (SectionHead) only: the recipe lays out the list. |
| `contentClass` | `string` | None | For recipes. Classes for the row that holds the header and the people, such as a split from a container width. |
| `headerClass` | `string` | None | For recipes. Classes for the header (the eyebrow, the heading and the text). |
| `listClass` | `string` | None | For recipes. Classes for the list of people (the <ul>), such as its columns and gaps. It sits inside the team container, so its classes can query it (@3xl/team:...). |
| `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. |
| Slot | Description |
| --- | --- |
| `eyebrow` | A short line above the heading, such as a Badge. Shown only with a heading. |
| `default` | The people: one <li> each, holding a TeamMember. |
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. Pass childHeadingTag({ heading, headingTag }) from lib/heading.ts to each TeamMember's headingTag; with no heading it gives an h3.
- 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".
Team
FreeTo build your own team layout: a section heading and the people, each with a photo, name and role. For a ready layout, use TeamGrid or TeamSplit.
- File
- Team.astro
- Group
- Marketing sections
- Kind
- Static: no JavaScript
- Examples
- 1
Examples
Drag the orange handle to set the width. Frames get real breakpoints.
- Static
- Interactive
- Framed
Slots
The section is a shell: the eyebrow, the heading and the text always show in that order, then the list of people in the default slot, one TeamMember in an <li> each. The shell sets the type and the gaps; the recipes lay out the list. TeamGrid and TeamSplit are recipes built on it, and Pro adds TeamList and TeamSpotlight. childHeadingTag() in lib/heading.ts gives the names' heading level.
This preview did not load.
main.astro
examples/team/main.astro
---
import Badge from "@astronomic-dev/ui/components/Badge.astro";
import Team from "@astronomic-dev/ui/components/Team.astro";
import TeamMember from "@astronomic-dev/ui/components/TeamMember.astro";
import { childHeadingTag } from "@astronomic-dev/ui/lib/heading.ts";
// Your own photos.
import ada from "../../photos/portrait-curly-hair.webp";
import tomas from "../../photos/portrait-smiling.webp";
const heading = "The studio";
const people = [
{ name: "Ada Brook", role: "Founder and design lead", image: { src: ada } },
{ name: "Sam Okafor", role: "Lead developer" },
{ name: "Tomás Vidal", role: "Project manager", image: { src: tomas } },
];
// One level under the section heading: h2 gives h3.
const tag = childHeadingTag({ heading });
---
<div class="mx-auto max-w-6xl px-6 py-16">
<Team heading={heading} text="Three people who plan, design and build every Astronomic site." listClass="grid-cols-[repeat(auto-fit,minmax(min(100%,13rem),1fr))] gap-x-cards gap-y-blocks">
<Badge slot="eyebrow">People</Badge>
{
people.map((p) => (
<li class="grid min-w-0">
<TeamMember name={p.name} role={p.role} image={p.image} headingTag={tag} />
</li>
))
}
</Team>
</div>Minimal · Light