Marketing sectionsWorkList
Searchastronomic.dev# WorkList
To list many projects as rows of text, each showing its photo when the pointer is on it.
Interactive: inline script.
## Usage
```astro
import WorkList from "@astronomic/ui-pro/components/WorkList.astro";
```
## Examples
### Rows with a preview
Ruled rows: the title, the client, the services and the year, in four columns from a 42rem work container. On a fine pointer from 48rem, each row's photo shows in a preview column at the list's end while the row is hovered or holds focus; on a touch screen or in a narrow column it sits in the row. No summaries.
```astro
---
import WorkList from "@astronomic/ui-pro/components/WorkList.astro";
// Your own photos.
import concrete from "../../photos/concrete-slab.webp";
import desk from "../../photos/studio-desk.webp";
import plants from "../../photos/plants-shelf.webp";
import shelves from "../../photos/studio-shelves.webp";
import sketch from "../../photos/sketching-wireframes.webp";
import stairway from "../../photos/white-stairway.webp";
// Your projects, in the order you want them. Each photo's alt says what it shows; the title is the card's link.
const projects = [
{ title: "Larkspur Ceramics", href: "#larkspur", client: "Larkspur", year: "2026", services: ["Brand", "Web"], summary: "A shop for a two-person pottery studio, built around the kiln schedule.", image: { src: shelves, alt: "Plates and bowls on white shelves." } },
{ title: "Quarry Street Library", href: "#quarry", client: "City of Ashford", year: "2026", services: ["Web", "Wayfinding"], summary: "Signs and a site that send readers to the right floor.", image: { src: stairway, alt: "A white stairwell seen from above." } },
{ title: "Fernhill Plant Rooms", href: "#fernhill", client: "Fernhill", year: "2025", services: ["Brand"], summary: "A calm name and mark for a plant shop with two rooms.", image: { src: plants, alt: "Two potted plants on a wooden shelf." } },
{ title: "Slate & Sky Architects", href: "#slate", client: "Slate & Sky", year: "2025", services: ["Web", "Motion"], summary: "A portfolio that lets the buildings speak first.", image: { src: concrete, alt: "A concrete building against a pale sky." } },
{ title: "Wireframe Weekly", href: "#wireframe", client: "Astronomic", year: "2024", services: ["Editorial"], summary: "A newsletter on sketching pages before the first pixel.", image: { src: sketch, alt: "A hand sketching page layouts beside a mug." } },
{ title: "The Desk Edition", href: "#desk", client: "Astronomic", year: "2024", services: ["Product", "Web"], summary: "A small store for the prints on our studio wall.", image: { src: desk, alt: "A laptop, a framed print and a cactus on a light wood desk." } },
];
---
<!-- Hover or Tab through the rows: on a fine pointer each row's photo shows in the preview column. -->
<div class="mx-auto max-w-6xl px-6 py-10">
<WorkList heading="All work" mark="(06)" markLabel="6 projects" items={projects} numbered>
<span slot="eyebrow" class="text-eyebrow text-muted">(003) Index</span>
</WorkList>
</div>
```
## Props
### WorkList
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `heading` | `string` | None | The section heading. Without it there is no section and no header: a plain <div> holds only the work. |
| `emphasis` | `boolean` | `false` | Turn one *phrase* in the heading into <em>, as in "Work *we are proud of*". Off by default, so the heading shows as typed. |
| `mark` | `string` | None | A short mark after the heading, such as "(12)", in small muted type, outside the heading. Shown only with a heading. |
| `markLabel` | `string` | None | What the mark says to a screen reader, such as "12 projects". Without it, the mark is read as written. |
| `text` | `string` | None | One or two sentences under the heading. Shown only with a heading. |
| `headingTag` | `"h2" \| "h3" \| "h4"` | `"h2"` | The heading element. Each project's title sits one level under it. |
| `itemHeadingTag` | `"h2" \| "h3" \| "h4" \| "h5"` | None | The title element when there is no heading (h3 if unset). With a heading, titles sit one level under it. |
| `items` | `WorkItem[]` | None | Required, one or more (empty stops the build): { title, href, image, client?, year?, services?, summary?, transitionName? } (WorkItem, exported from each recipe). image is { src, alt, width?, height?, ratio?, focalPoint?, loading? } (MediaImage): write its alt. Only these fields reach the markup, so a CMS entry's other fields never land on the page. |
| `numbered` | `boolean` | `false` | Each title gets its place as a mark, "(01)", hidden from screen readers. |
| `numberFormat` | `"paren" \| "slash"` | `"paren"` | How a numbered list writes its marks: paren, "(01)", or slash, "01 /" (the slash in the mark's own quiet type). WorkCard's numberFormat; WorkList's rows take it too. numberMark() in lib/number-mark.ts writes the same mark for your own parts. |
| `grayscale` | `boolean` | `false` | Black and white photos, in color on hover and on focus. The fade (about 0.4s) runs only when motion is allowed. |
| `viewText` | `string` | None | A pill on each card's photo, such as "View case study", shown on hover and when focus is within the card (WorkCard's viewText). WorkList ignores it. |
| `imageComponent` | `ImageComponent` | None | Your image component, for every photo: Astro's <Image>, or a small wrapper for your CMS. |
| `imageSizes` | `string` | `"(min-width: 48rem) 34vw, 100vw"` | How wide each photo shows, as the sizes attribute, for your component's srcset. Default here: (min-width: 48rem) 34vw, 100vw. |
| `class` | `string` | None | More classes for the root (the <section>, or the <div> without a heading), merged with cn(). The root is a named size container (work). |
| Slot | Description |
| --- | --- |
| `eyebrow` | A short line above the heading, such as "(002) Work". Shown only with a heading. |
| `actions` | After the list: a "View all work" link or Button. |
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. Without one, a plain <div>: put your own heading above it.
- The projects are one list (<ul role="list">). Each project is one link, its title, which sits one level under the section heading (h2 gives h3).
- With numbered, "(01)" sits before each title, hidden from screen readers, so the link's name is the title alone.
- The year on the photo is plain text in the scrim colors, not a control.
- grayscale turns a photo to color on hover and on focus inside the card, so a keyboard reader sees it too. The fade runs only when motion is allowed: under reduced motion or a calm theme the photo changes at once.
- viewText's pill ("View case study", on a card's photo) is hidden from screen readers and takes no pointer: the link's name stays the title. It shows on hover and when focus is within the card; it fades in only when motion is allowed. WorkList ignores viewText.
- transitionName names the photo for your view transition only when motion is allowed.
- Each row's photo has an empty alt: the row's title names the project, and the photo is a preview of it.
WorkList
ProTo list many projects as rows of text, each showing its photo when the pointer is on it.
- File
- WorkList.astro
- Group
- Marketing sections
- Kind
- Interactive: inline script
- Examples
- 1
Examples
Drag the orange handle to set the width. Frames get real breakpoints.
- Static
- Interactive
- Framed
Rows with a preview
Ruled rows: the title, the client, the services and the year, in four columns from a 42rem work container. On a fine pointer from 48rem, each row's photo shows in a preview column at the list's end while the row is hovered or holds focus; on a touch screen or in a narrow column it sits in the row. No summaries.
This preview did not load.
main.astro
examples/worklist/main.astro
---
import WorkList from "@astronomic/ui-pro/components/WorkList.astro";
// Your own photos.
import concrete from "../../photos/concrete-slab.webp";
import desk from "../../photos/studio-desk.webp";
import plants from "../../photos/plants-shelf.webp";
import shelves from "../../photos/studio-shelves.webp";
import sketch from "../../photos/sketching-wireframes.webp";
import stairway from "../../photos/white-stairway.webp";
// Your projects, in the order you want them. Each photo's alt says what it shows; the title is the card's link.
const projects = [
{ title: "Larkspur Ceramics", href: "#larkspur", client: "Larkspur", year: "2026", services: ["Brand", "Web"], summary: "A shop for a two-person pottery studio, built around the kiln schedule.", image: { src: shelves, alt: "Plates and bowls on white shelves." } },
{ title: "Quarry Street Library", href: "#quarry", client: "City of Ashford", year: "2026", services: ["Web", "Wayfinding"], summary: "Signs and a site that send readers to the right floor.", image: { src: stairway, alt: "A white stairwell seen from above." } },
{ title: "Fernhill Plant Rooms", href: "#fernhill", client: "Fernhill", year: "2025", services: ["Brand"], summary: "A calm name and mark for a plant shop with two rooms.", image: { src: plants, alt: "Two potted plants on a wooden shelf." } },
{ title: "Slate & Sky Architects", href: "#slate", client: "Slate & Sky", year: "2025", services: ["Web", "Motion"], summary: "A portfolio that lets the buildings speak first.", image: { src: concrete, alt: "A concrete building against a pale sky." } },
{ title: "Wireframe Weekly", href: "#wireframe", client: "Astronomic", year: "2024", services: ["Editorial"], summary: "A newsletter on sketching pages before the first pixel.", image: { src: sketch, alt: "A hand sketching page layouts beside a mug." } },
{ title: "The Desk Edition", href: "#desk", client: "Astronomic", year: "2024", services: ["Product", "Web"], summary: "A small store for the prints on our studio wall.", image: { src: desk, alt: "A laptop, a framed print and a cactus on a light wood desk." } },
];
---
<!-- Hover or Tab through the rows: on a fine pointer each row's photo shows in the preview column. -->
<div class="mx-auto max-w-6xl px-6 py-10">
<WorkList heading="All work" mark="(06)" markLabel="6 projects" items={projects} numbered>
<span slot="eyebrow" class="text-eyebrow text-muted">(003) Index</span>
</WorkList>
</div>Minimal · Light