Publishing sectionsArticleHeaderPlain
Searchastronomic.dev# ArticleHeaderPlain
At the top of a post: the topic, date and reading time, the title, a line under it and the byline, with the photo under them.
Static: no JavaScript.
## Usage
```astro
import ArticleHeaderPlain from "@astronomic-dev/ui/components/ArticleHeaderPlain.astro";
```
## Examples
### A post with a photo
The topic pill, the date and reading time, the title and the standfirst, then the photo under them at the row's full width, at 16:9. The photo opens the page, so it loads eagerly at high priority.
```astro
---
import ArticleHeaderPlain from "@astronomic-dev/ui/components/ArticleHeaderPlain.astro";
// Your own image file.
import sketch from "../../photos/sketching-wireframes.webp";
---
<div class="mx-auto max-w-4xl px-6 py-16">
<ArticleHeaderPlain
title="Sketch the page before the first pixel"
text="Every Astronomic project starts with a pencil. Here is what the sketches decide before design begins, and what they leave open."
date="2026-10-14"
readingTime="6 min read"
topic={{ label: "Design", href: "#topic-design" }}
image={{ src: sketch, alt: "A hand sketching page layouts on paper beside a mug." }}
/>
</div>
```
### Centered
align="center": the same header with the text centered, here with a series link in the meta line.
```astro
---
import ArticleHeaderPlain from "@astronomic-dev/ui/components/ArticleHeaderPlain.astro";
// Your own image file.
import stairway from "../../photos/white-stairway.webp";
---
<div class="mx-auto max-w-4xl px-6 py-16">
<ArticleHeaderPlain
align="center"
title="What we cut from our own site"
text="Three pages, two animations and one font: why less was the faster way to say what the studio does."
date="2026-10-07"
readingTime="5 min read"
series={{ label: "Rebuilding Astronomic, part 2 of 3", href: "#series-rebuild" }}
topic={{ label: "Studio", href: "#topic-studio" }}
image={{ src: stairway, alt: "A white stairwell seen from above." }}
/>
</div>
```
### No photo
Without an image, just the text: the fallback for any post.
```astro
---
import ArticleHeaderPlain from "@astronomic-dev/ui/components/ArticleHeaderPlain.astro";
---
<div class="mx-auto max-w-3xl px-6 py-16">
<ArticleHeaderPlain
title="A launch checklist for a small studio site"
text="The twelve checks we run the week before a site goes live, from redirects to the contact form."
date="2026-09-30"
readingTime="4 min read"
topic={{ label: "Process", href: "#topic-process" }}
/>
</div>
```
### With a byline
A Byline in the byline slot, under the standfirst, with a share button in its actions slot.
```astro
---
import Share from "@lucide/astro/icons/share";
import ArticleHeaderPlain from "@astronomic-dev/ui/components/ArticleHeaderPlain.astro";
import Button from "@astronomic-dev/ui/components/Button.astro";
import Byline from "@astronomic-dev/ui/components/Byline.astro";
import Icon from "@astronomic-dev/ui/components/Icon.astro";
// Your own photos.
import folders from "../../photos/folder-stack.webp";
import ada from "../../photos/portrait-curly-hair.webp";
---
<div class="mx-auto max-w-4xl px-6 py-16">
<ArticleHeaderPlain
title="How we name the files we hand over"
text="A client should find any file in ten seconds, a year later. The rules we use, and the folders they make."
date="2026-09-22"
readingTime="7 min read"
topic={{ label: "Process", href: "#topic-process" }}
image={{ src: folders, alt: "A stack of white binders." }}
>
<Byline slot="byline" authors={[{ name: "Ada Brook", href: "#ada", image: { src: ada } }]} series={{ label: "Handover notes, part 2", href: "#series-handover" }}>
<Button slot="actions" variant="ghost" size="sm"><Icon icon={Share} size="sm" />Share</Button>
</Byline>
</ArticleHeaderPlain>
</div>
```
## Props
### ArticleHeaderPlain
| 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 | The post's photo, under the text: { src, alt, width?, height?, focalPoint?, loading? }. It is content: write its alt. Loaded eagerly at high priority unless it sets its own loading. Without it, just the text. |
| `imageComponent` | `ImageComponent` | None | Your image component for the photo (Media's imageComponent): Astro's <Image>, or a small wrapper for your CMS. |
| `imageSizes` | `string` | `"(min-width: 80rem) 77rem, 100vw"` | How wide the photo shows, for imageComponent's srcset. |
| `ratioClass` | `string` | `"aspect-[16/9]"` | The photo's shape, as classes (Media's ratioClass), such as aspect-[3/2]. |
| Slot | Description |
| --- | --- |
| `byline` | Under the standfirst: a Byline, or your own line. |
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 photo is content: write its alt.
ArticleHeaderPlain
FreeAt the top of a post: the topic, date and reading time, the title, a line under it and the byline, with the photo under them.
- File
- ArticleHeaderPlain.astro
- Group
- Publishing sections
- Kind
- Static: no JavaScript
- Examples
- 4
Examples
Drag the orange handle to set the width. Frames get real breakpoints.
- Static
- Interactive
- Framed
A post with a photo
The topic pill, the date and reading time, the title and the standfirst, then the photo under them at the row's full width, at 16:9. The photo opens the page, so it loads eagerly at high priority.
This preview did not load.
examples/articleheaderplain/main.astro
---
import ArticleHeaderPlain from "@astronomic-dev/ui/components/ArticleHeaderPlain.astro";
// Your own image file.
import sketch from "../../photos/sketching-wireframes.webp";
---
<div class="mx-auto max-w-4xl px-6 py-16">
<ArticleHeaderPlain
title="Sketch the page before the first pixel"
text="Every Astronomic project starts with a pencil. Here is what the sketches decide before design begins, and what they leave open."
date="2026-10-14"
readingTime="6 min read"
topic={{ label: "Design", href: "#topic-design" }}
image={{ src: sketch, alt: "A hand sketching page layouts on paper beside a mug." }}
/>
</div>Centered
align="center": the same header with the text centered, here with a series link in the meta line.
This preview did not load.
examples/articleheaderplain/center.astro
---
import ArticleHeaderPlain from "@astronomic-dev/ui/components/ArticleHeaderPlain.astro";
// Your own image file.
import stairway from "../../photos/white-stairway.webp";
---
<div class="mx-auto max-w-4xl px-6 py-16">
<ArticleHeaderPlain
align="center"
title="What we cut from our own site"
text="Three pages, two animations and one font: why less was the faster way to say what the studio does."
date="2026-10-07"
readingTime="5 min read"
series={{ label: "Rebuilding Astronomic, part 2 of 3", href: "#series-rebuild" }}
topic={{ label: "Studio", href: "#topic-studio" }}
image={{ src: stairway, alt: "A white stairwell seen from above." }}
/>
</div>No photo
Without an image, just the text: the fallback for any post.
This preview did not load.
examples/articleheaderplain/no-image.astro
---
import ArticleHeaderPlain from "@astronomic-dev/ui/components/ArticleHeaderPlain.astro";
---
<div class="mx-auto max-w-3xl px-6 py-16">
<ArticleHeaderPlain
title="A launch checklist for a small studio site"
text="The twelve checks we run the week before a site goes live, from redirects to the contact form."
date="2026-09-30"
readingTime="4 min read"
topic={{ label: "Process", href: "#topic-process" }}
/>
</div>With a byline
A Byline in the byline slot, under the standfirst, with a share button in its actions slot.
This preview did not load.
examples/articleheaderplain/with-byline.astro
---
import Share from "@lucide/astro/icons/share";
import ArticleHeaderPlain from "@astronomic-dev/ui/components/ArticleHeaderPlain.astro";
import Button from "@astronomic-dev/ui/components/Button.astro";
import Byline from "@astronomic-dev/ui/components/Byline.astro";
import Icon from "@astronomic-dev/ui/components/Icon.astro";
// Your own photos.
import folders from "../../photos/folder-stack.webp";
import ada from "../../photos/portrait-curly-hair.webp";
---
<div class="mx-auto max-w-4xl px-6 py-16">
<ArticleHeaderPlain
title="How we name the files we hand over"
text="A client should find any file in ten seconds, a year later. The rules we use, and the folders they make."
date="2026-09-22"
readingTime="7 min read"
topic={{ label: "Process", href: "#topic-process" }}
image={{ src: folders, alt: "A stack of white binders." }}
>
<Byline slot="byline" authors={[{ name: "Ada Brook", href: "#ada", image: { src: ada } }]} series={{ label: "Handover notes, part 2", href: "#series-handover" }}>
<Button slot="actions" variant="ghost" size="sm"><Icon icon={Share} size="sm" />Share</Button>
</Byline>
</ArticleHeaderPlain>
</div>