Publishing sectionsCaseHero
Searchastronomic.dev# CaseHero
At the top of a case study: the project's name, its client and year, an intro, the facts and a cover photo or video.
Interactive: inline script.
## Usage
```astro
import CaseHero from "@astronomic/ui-pro/components/CaseHero.astro";
```
## Examples
### With a photo
Your breadcrumb, the title (the page's h1), the index line (read as markLabel), the client and year, the intro beside its label from a 48rem head, the facts on ruled columns, and the cover photo, loaded first (eager, high priority).
```astro
---
import CaseHero from "@astronomic/ui-pro/components/CaseHero.astro";
// Your own photo.
import shelves from "../../photos/studio-shelves.webp";
// Your project's facts, in the order you want them read.
const facts = [
{ term: "Services", detail: ["Brand", "Web"] },
{ term: "Team", detail: "Two designers, one developer" },
{ term: "Launched", detail: "March 2026" },
];
---
<!-- The top of a case study: your breadcrumb, the title (the page's h1), the index line, the intro beside its label, the facts and the cover photo, loaded first. -->
<div class="mx-auto max-w-6xl px-6 py-10">
<CaseHero
title="Larkspur Ceramics"
mark="(01/06) Case study"
markLabel="Case study 1 of 6"
client="Larkspur"
year="2026"
introLabel="Overview"
intro="A shop for a two-person pottery studio, built around the kiln schedule, so every firing sells as its own small release."
facts={facts}
image={{ src: shelves, alt: "Plates and bowls from the first firing on white shelves." }}
>
<nav slot="breadcrumb" aria-label="Breadcrumb" class="text-small text-muted"><a href="#work" class="text-inherit underline">Work</a> / Larkspur Ceramics</nav>
</CaseHero>
</div>
```
### With a video
video in place of image: a VideoMedia with preload="metadata", its poster the first paint. With no file yet (sources={[]}) the poster shows as a still.
```astro
---
import CaseHero from "@astronomic/ui-pro/components/CaseHero.astro";
// Your own poster image. Put your video files next to it and list them in sources, the smallest first:
// sources: [{ src: "/video/larkspur.webm", type: "video/webm" }, { src: "/video/larkspur.mp4", type: "video/mp4" }]
import shelves from "../../photos/studio-shelves.webp";
---
<!-- video in place of image: a VideoMedia whose poster is the first paint. No file yet, so the poster shows as a still. -->
<div class="mx-auto max-w-6xl px-6 py-10">
<CaseHero
title="Larkspur Ceramics"
client="Larkspur"
year="2026"
intro="A shop for a two-person pottery studio, built around the kiln schedule."
video={{ sources: [], poster: shelves, label: "The first firing coming out of the kiln" }}
/>
</div>
```
### Mark at the title's end
markPlacement="end": the index line moves to the end of the title's row, level with its last line, and wraps under a title that fills the row. The client and year stay on the line below.
```astro
---
import CaseHero from "@astronomic/ui-pro/components/CaseHero.astro";
// Your own photo.
import shelves from "../../photos/studio-shelves.webp";
---
<!-- The index line at the end of the title's row, level with its last line; it wraps under a long title. -->
<div class="mx-auto max-w-6xl px-6 py-10">
<CaseHero
title="Larkspur Ceramics"
mark="(01/06) Case study"
markLabel="Case study 1 of 6"
markPlacement="end"
client="Larkspur"
year="2026"
intro="A shop for a two-person pottery studio, built around the kiln schedule, so every firing sells as its own small release."
image={{ src: shelves, alt: "Plates and bowls from the first firing on white shelves." }}
>
<nav slot="breadcrumb" aria-label="Breadcrumb" class="text-small text-muted"><a href="#work" class="text-inherit underline">Work</a> / Larkspur Ceramics</nav>
</CaseHero>
</div>
```
### Six facts
The facts take two columns on a phone, three from a 42rem head and six from 64rem.
```astro
---
import CaseHero from "@astronomic/ui-pro/components/CaseHero.astro";
// Your own photo.
import stairway from "../../photos/white-stairway.webp";
const facts = [
{ term: "Client", detail: "City of Ashford" },
{ term: "Services", detail: ["Web", "Wayfinding"] },
{ term: "Team", detail: "Four people" },
{ term: "Length", detail: "Five months" },
{ term: "Launched", detail: "January 2026" },
{ term: "Floors signed", detail: "Six" },
];
---
<!-- Six facts: two columns on a phone, three from a 42rem head, six from 64rem. -->
<div class="mx-auto max-w-6xl px-6 py-10">
<CaseHero title="Quarry Street Library" mark="(02/06)" year="2026" introLabel="Overview" intro="Signs and a site that send readers to the right floor." facts={facts} image={{ src: stairway, alt: "The library's white stairwell seen from above." }} />
</div>
```
## Props
### CaseHero
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `title` | `string` | None | Required. The project's name: the page's h1, in the display role. |
| `mark` | `string` | None | An index line under the title, such as "(01/12) Case study", small and muted. |
| `markLabel` | `string` | None | What the mark says to a screen reader, such as "Case study 1 of 12": the mark is then hidden and this is read in its place. |
| `markPlacement` | `"below" \| "end"` | `"below"` | Where the mark sits: below, on the line under the title with the client and year; end, at the end of the title's row, level with its last line (it wraps under a long title). Outside the h1 either way. |
| `client` | `string` | None | The client's name, after the title. |
| `year` | `string` | None | The year as you want it shown, after the title. |
| `introLabel` | `string` | None | A short label beside the intro, such as "Overview". |
| `intro` | `string` | None | One or two sentences that open the case study, in the lead role. |
| `facts` | `DescriptionItem[]` | None | The project's facts, { term, detail } (DescriptionItem from the free DescriptionList; detail may be a list): two columns, three from 42rem, six from 64rem of the head. |
| `image` | `MediaImage` | None | The cover photo, { src, alt, width?, height?, ratio?, focalPoint? }, 16/9 by default, loaded eagerly at high priority. Exactly one of image or video, or the build stops. |
| `video` | `CaseVideo` | None | The cover video, { sources, poster, label, focalPoint? } (CaseVideo, exported): a VideoMedia with preload="metadata", its poster the first paint. Only these fields reach it. Exactly one of image or video. |
| `imageComponent` | `ImageComponent` | None | Your image component, for the photo: Astro's <Image>, or a small wrapper for your CMS. |
| `imageSizes` | `string` | `"100vw"` | How wide the photo shows, as the sizes attribute, for your component's srcset. |
| `transitionName` | `string` | None | The same name as the work card's transitionName, for your view transition from the card into this cover. Set only when motion is allowed. |
| `factsClass` | `string` | None | Classes for the facts' grid (the <dl>), merged with cn(). |
| `class` | `string` | None | More classes for the <header>, merged with cn(). It is a named size container (case-hero). |
| Slot | Description |
| --- | --- |
| `breadcrumb` | Your trail above the title, such as a <nav aria-label="Breadcrumb">. The kit has no breadcrumb part. |
Any other attribute goes on the <header>.
## Accessibility
- The title is the page's one h1. Put CaseHero at the top of <main>, and no other h1 on the page.
- With markLabel the index line is read in words ("Case study 1 of 12") and its figures are hidden.
- The mark is never part of the h1, wherever it sits, so the page's heading reads as the project's name alone.
- The facts are a description list (<dl>): each term is read with its detail.
- Write the photo's alt. A video's label names its play button; with reduced motion or a calm theme it shows its poster and waits for a press.
CaseHero
ProAt the top of a case study: the project's name, its client and year, an intro, the facts and a cover photo or video.
- File
- CaseHero.astro
- Group
- Publishing sections
- Kind
- Interactive: inline script
- Examples
- 4
Examples
Drag the orange handle to set the width. Frames get real breakpoints.
- Static
- Interactive
- Framed
With a photo
Your breadcrumb, the title (the page's h1), the index line (read as markLabel), the client and year, the intro beside its label from a 48rem head, the facts on ruled columns, and the cover photo, loaded first (eager, high priority).
This preview did not load.
examples/casehero/main.astro
---
import CaseHero from "@astronomic/ui-pro/components/CaseHero.astro";
// Your own photo.
import shelves from "../../photos/studio-shelves.webp";
// Your project's facts, in the order you want them read.
const facts = [
{ term: "Services", detail: ["Brand", "Web"] },
{ term: "Team", detail: "Two designers, one developer" },
{ term: "Launched", detail: "March 2026" },
];
---
<!-- The top of a case study: your breadcrumb, the title (the page's h1), the index line, the intro beside its label, the facts and the cover photo, loaded first. -->
<div class="mx-auto max-w-6xl px-6 py-10">
<CaseHero
title="Larkspur Ceramics"
mark="(01/06) Case study"
markLabel="Case study 1 of 6"
client="Larkspur"
year="2026"
introLabel="Overview"
intro="A shop for a two-person pottery studio, built around the kiln schedule, so every firing sells as its own small release."
facts={facts}
image={{ src: shelves, alt: "Plates and bowls from the first firing on white shelves." }}
>
<nav slot="breadcrumb" aria-label="Breadcrumb" class="text-small text-muted"><a href="#work" class="text-inherit underline">Work</a> / Larkspur Ceramics</nav>
</CaseHero>
</div>With a video
video in place of image: a VideoMedia with preload="metadata", its poster the first paint. With no file yet (sources={[]}) the poster shows as a still.
This preview did not load.
examples/casehero/video.astro
---
import CaseHero from "@astronomic/ui-pro/components/CaseHero.astro";
// Your own poster image. Put your video files next to it and list them in sources, the smallest first:
// sources: [{ src: "/video/larkspur.webm", type: "video/webm" }, { src: "/video/larkspur.mp4", type: "video/mp4" }]
import shelves from "../../photos/studio-shelves.webp";
---
<!-- video in place of image: a VideoMedia whose poster is the first paint. No file yet, so the poster shows as a still. -->
<div class="mx-auto max-w-6xl px-6 py-10">
<CaseHero
title="Larkspur Ceramics"
client="Larkspur"
year="2026"
intro="A shop for a two-person pottery studio, built around the kiln schedule."
video={{ sources: [], poster: shelves, label: "The first firing coming out of the kiln" }}
/>
</div>Mark at the title's end
markPlacement="end": the index line moves to the end of the title's row, level with its last line, and wraps under a title that fills the row. The client and year stay on the line below.
This preview did not load.
examples/casehero/mark-end.astro
---
import CaseHero from "@astronomic/ui-pro/components/CaseHero.astro";
// Your own photo.
import shelves from "../../photos/studio-shelves.webp";
---
<!-- The index line at the end of the title's row, level with its last line; it wraps under a long title. -->
<div class="mx-auto max-w-6xl px-6 py-10">
<CaseHero
title="Larkspur Ceramics"
mark="(01/06) Case study"
markLabel="Case study 1 of 6"
markPlacement="end"
client="Larkspur"
year="2026"
intro="A shop for a two-person pottery studio, built around the kiln schedule, so every firing sells as its own small release."
image={{ src: shelves, alt: "Plates and bowls from the first firing on white shelves." }}
>
<nav slot="breadcrumb" aria-label="Breadcrumb" class="text-small text-muted"><a href="#work" class="text-inherit underline">Work</a> / Larkspur Ceramics</nav>
</CaseHero>
</div>Six facts
The facts take two columns on a phone, three from a 42rem head and six from 64rem.
This preview did not load.
examples/casehero/many-facts.astro
---
import CaseHero from "@astronomic/ui-pro/components/CaseHero.astro";
// Your own photo.
import stairway from "../../photos/white-stairway.webp";
const facts = [
{ term: "Client", detail: "City of Ashford" },
{ term: "Services", detail: ["Web", "Wayfinding"] },
{ term: "Team", detail: "Four people" },
{ term: "Length", detail: "Five months" },
{ term: "Launched", detail: "January 2026" },
{ term: "Floors signed", detail: "Six" },
];
---
<!-- Six facts: two columns on a phone, three from a 42rem head, six from 64rem. -->
<div class="mx-auto max-w-6xl px-6 py-10">
<CaseHero title="Quarry Street Library" mark="(02/06)" year="2026" introLabel="Overview" intro="Signs and a site that send readers to the right floor." facts={facts} image={{ src: stairway, alt: "The library's white stairwell seen from above." }} />
</div>