Publishing sectionsArticleHeaderCover
Searchastronomic.dev# ArticleHeaderCover
At the top of a post with a strong photo: the title, a line under it, the topic and date on the photo itself.
Static: no JavaScript.
## Usage
```astro
import ArticleHeaderCover from "@astronomic/ui-pro/components/ArticleHeaderCover.astro";
```
## Examples
### A post with a strong photo
The photo fills a box at least clamp(32.5rem, 74svh, 45rem) tall with media corners; the topic pill, the date, series and reading time, the title and the standfirst sit at its foot on the scrim. Put the Byline under the header.
```astro
---
import ArticleHeaderCover from "@astronomic/ui-pro/components/ArticleHeaderCover.astro";
// Your own image file.
import shelves from "../../photos/studio-shelves.webp";
---
<div class="mx-auto max-w-6xl px-6 py-10">
<ArticleHeaderCover
title="A week in the studio"
text="Five days, two launches and one long lunch: what a normal week at Astronomic looks like, hour by hour."
date="2026-10-14"
readingTime="9 min read"
series={{ label: "Inside Astronomic, part 1 of 4", href: "#series-inside" }}
topic={{ label: "Studio", href: "#topic-studio" }}
image={{ src: shelves, alt: "Plates and bowls on white shelves in the studio kitchen." }}
/>
</div>
```
### Centered
align="center": the text block sits in the middle of the photo, its text centered.
```astro
---
import ArticleHeaderCover from "@astronomic/ui-pro/components/ArticleHeaderCover.astro";
// Your own image file.
import plants from "../../photos/plants-shelf.webp";
---
<div class="mx-auto max-w-6xl px-6 py-10">
<ArticleHeaderCover
align="center"
title="The plants that outlived three offices"
text="Who waters them, who moved them, and why the studio still has the fern from the first room."
date="2026-10-02"
readingTime="4 min read"
topic={{ label: "Studio", href: "#topic-studio" }}
image={{ src: plants, alt: "Two potted plants on a wooden shelf." }}
/>
</div>
```
### A long word
A title of one 30-character word breaks inside the box rather than run past it.
```astro
---
import ArticleHeaderCover from "@astronomic/ui-pro/components/ArticleHeaderCover.astro";
// Your own image file.
import slab from "../../photos/concrete-slab.webp";
---
<div class="mx-auto max-w-6xl px-6 py-10">
<ArticleHeaderCover
title="Unsubscribeconfirmationpagesss"
text="One long word as the title: it breaks inside the box rather than run past it."
date="2026-09-18"
readingTime="3 min read"
topic={{ label: "Writing", href: "#topic-writing" }}
image={{ src: slab, alt: "A concrete building against the sky." }}
/>
</div>
```
## Props
### ArticleHeaderCover
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `title` | `string` | None | Required. The post's title, in the display role in display type, sized to the text block. One long word breaks inside the box. |
| `text` | `string` | None | The standfirst: one or two sentences under the title, in the lead role. |
| `headingTag` | `"h1" \| "h2"` | `"h1"` | The title element. A post header opens its page, so h1; set h2 when the page has its own h1. |
| `date` | `DateInput` | None | The post's date: "YYYY-MM-DD", such as "2026-10-14" (the canonical form), or a Date read in UTC, as Astro content collections give. new Date(2026, 9, 14) is local midnight, which shows the day before east of UTC: pass the string instead. A bad value throws at build time with the value in the message, so no page says "Invalid Date". |
| `dateLabel` | `string` | None | Your own text in place of the printed date, such as "Updated 3 days ago". The datetime stays the date. Shown only with a date. |
| `readingTime` | `string` | None | Your own text, such as "12 min read". |
| `series` | `{ label: string; href?: string }` | None | Where the post sits in a series, your own text, such as { label: "Part 1 of 4", href: "/series/launch" }. With href the label links to the series page. |
| `topic` | `PostTopic` | None | The post's topic as a pill: { label, href? }. With href, a link to the topic's page. |
| `locale` | `string` | `"en"` | The date's language, such as "de" (formatDate in lib/date.ts). |
| `align` | `"start" \| "center"` | `"start"` | The text's alignment, inside the same structure. |
| `class` | `string` | None | More classes for the <header>, merged with cn(), so yours win on conflicts. The header is a named size container (inline-size containment): in a shrink-to-fit parent it collapses, so give it a width there. |
| `image` | `MediaImage` | None | Required. The photo behind the text: { src, alt, width?, height?, focalPoint?, loading? }. It fills the header and is cropped, so its ratio is not used. Write its alt: it is the post's main picture. Loaded eagerly at high priority unless it sets its own loading. |
| `imageComponent` | `ImageComponent` | None | Your image component for the photo: Astro's <Image>, or a small wrapper for your CMS. It gets sizes="100vw". |
Any other attribute goes on the <header>.
## Accessibility
- Renders a <header>: put it inside your <article>, so it is that post's header, not a region of its own.
- The title is the page's h1 by default; set headingTag to h2 when the page has its own h1.
- The date is a <time> with a machine date (datetime="2026-10-14"), whatever the text says. The middle dots between the date, series and reading time are hidden from screen readers.
- The topic is a link with a 44px hit area on touch screens; the pill keeps its small look. The series link is a 44px box on touch screens, so its line grows there; with a mouse it is plain text size.
- With align="center" the meta items have no middle dots: they are split by space, and each line is centered. Start-aligned, a wrapped line never starts with a dot.
- The meta line wraps between its pieces, and a piece wider than the line (a long series name) breaks inside it, so nothing runs out of a narrow column.
- The title, the standfirst and the meta line are in --ui-scrim-fg on --ui-scrim at 60% or more, so they read at 4.5:1 on any photo in every kit preset, light and dark. The topic pill is scrim text on a scrim-fg fill.
- Every link in the text gets a focus ring that shows on any photo: a light line on a dark edge.
- The photo is behind the text: write its alt too, since it is the post's main picture.
ArticleHeaderCover
ProAt the top of a post with a strong photo: the title, a line under it, the topic and date on the photo itself.
- File
- ArticleHeaderCover.astro
- Group
- Publishing sections
- Kind
- Static: no JavaScript
- Examples
- 3
Examples
Drag the orange handle to set the width. Frames get real breakpoints.
- Static
- Interactive
- Framed
A post with a strong photo
The photo fills a box at least clamp(32.5rem, 74svh, 45rem) tall with media corners; the topic pill, the date, series and reading time, the title and the standfirst sit at its foot on the scrim. Put the Byline under the header.
This preview did not load.
examples/articleheadercover/main.astro
---
import ArticleHeaderCover from "@astronomic/ui-pro/components/ArticleHeaderCover.astro";
// Your own image file.
import shelves from "../../photos/studio-shelves.webp";
---
<div class="mx-auto max-w-6xl px-6 py-10">
<ArticleHeaderCover
title="A week in the studio"
text="Five days, two launches and one long lunch: what a normal week at Astronomic looks like, hour by hour."
date="2026-10-14"
readingTime="9 min read"
series={{ label: "Inside Astronomic, part 1 of 4", href: "#series-inside" }}
topic={{ label: "Studio", href: "#topic-studio" }}
image={{ src: shelves, alt: "Plates and bowls on white shelves in the studio kitchen." }}
/>
</div>Centered
align="center": the text block sits in the middle of the photo, its text centered.
This preview did not load.
examples/articleheadercover/center.astro
---
import ArticleHeaderCover from "@astronomic/ui-pro/components/ArticleHeaderCover.astro";
// Your own image file.
import plants from "../../photos/plants-shelf.webp";
---
<div class="mx-auto max-w-6xl px-6 py-10">
<ArticleHeaderCover
align="center"
title="The plants that outlived three offices"
text="Who waters them, who moved them, and why the studio still has the fern from the first room."
date="2026-10-02"
readingTime="4 min read"
topic={{ label: "Studio", href: "#topic-studio" }}
image={{ src: plants, alt: "Two potted plants on a wooden shelf." }}
/>
</div>A long word
A title of one 30-character word breaks inside the box rather than run past it.
This preview did not load.
examples/articleheadercover/long-title.astro
---
import ArticleHeaderCover from "@astronomic/ui-pro/components/ArticleHeaderCover.astro";
// Your own image file.
import slab from "../../photos/concrete-slab.webp";
---
<div class="mx-auto max-w-6xl px-6 py-10">
<ArticleHeaderCover
title="Unsubscribeconfirmationpagesss"
text="One long word as the title: it breaks inside the box rather than run past it."
date="2026-09-18"
readingTime="3 min read"
topic={{ label: "Writing", href: "#topic-writing" }}
image={{ src: slab, alt: "A concrete building against the sky." }}
/>
</div>