
Process 6 min read
A launch checklist for a small studio site
The twelve checks we run the week before a site goes live, from redirects and page titles to the contact form and the 404 page.
Data displayPostCard
Searchastronomic.dev# PostCard
For one post as a card: its picture, the topic and date, the title, a short excerpt and the author. The post recipes use it for you.
Static: no JavaScript.
## Usage
```astro
import PostCard from "@astronomic-dev/ui/components/PostCard.astro";
```
## Examples
### In a Posts list
Two posts, each a PostCard in an <li>. The first has everything: the picture, the meta line (the topic link, the date and the reading time, a dot between each two), the title, an excerpt cut at three lines, and a footer with the author's photo and name. The second has no picture and no excerpt, and its topic is plain text: the card is shorter, and the two footers still line up on the bottom edge. The post recipes build their cards from it, so you only need it for your own layout.
```astro
---
import PostCard from "@astronomic-dev/ui/components/PostCard.astro";
import Posts from "@astronomic-dev/ui/components/Posts.astro";
import { childHeadingTag } from "@astronomic-dev/ui/lib/heading.ts";
// Your own pictures.
import ada from "../../photos/portrait-curly-hair.webp";
import desk from "../../photos/studio-desk.webp";
const heading = "From the blog";
// One level under the section heading: h2 gives h3.
const tag = childHeadingTag({ heading });
---
<div class="mx-auto max-w-6xl">
<Posts heading={heading} listClass="grid-cols-[repeat(auto-fit,minmax(min(100%,18rem),1fr))] gap-cards">
<li class="grid min-w-0">
<PostCard
href="#launch-checklist"
title="A launch checklist for a small studio site"
date="2026-10-14"
readingTime="6 min read"
excerpt="The twelve checks we run the week before a site goes live, from redirects and page titles to the contact form and the 404 page."
image={{ src: desk }}
topic={{ label: "Process", href: "#topic-process" }}
author={{ name: "Ada Brook", image: { src: ada } }}
headingTag={tag}
/>
</li>
<li class="grid min-w-0">
<PostCard href="#studio-news" title="Tomás Vidal joins Astronomic as project manager" date="2026-09-28" topic={{ label: "News" }} author={{ name: "Sam Okafor" }} headingTag={tag} />
</li>
</Posts>
</div>
```
## Props
### PostCard
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `href` | `string` | None | Required. The post's URL. The title is the only link to it; the whole card opens it. |
| `title` | `string` | None | Required. The post's title: the item heading and the link. |
| `date` | `DateInput` | None | Optional. 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". Written as <time datetime>. Without it there is no <time>; the topic and the reading time stand alone, or the meta line is left out. |
| `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. |
| `excerpt` | `string` | None | A line or two about the post, muted, cut at three lines. |
| `image` | `DecorativeImage` | None | The post's picture: { src, width?, height?, ratio?, focalPoint?, loading? } (DecorativeImage in lib/image.ts), 16/9 unless you set ratio. There is no alt: the part writes alt="", since the title says what the post is. Without it, the card starts with the meta line (or the title). |
| `imageComponent` | `ImageComponent` | None | Your image component for the photo (Media's imageComponent). Not for an Avatar. |
| `imageSizes` | `string` | None | How wide the photo shows, for imageComponent's sizes. The recipes set it. |
| `topic` | `PostTopic` | None | { label, href? } (PostTopic): with href a link to the topic's page, above the card's own link (a 44px box on a touch screen); without, plain text. First in the meta line, before the date, as quiet as the date (the line's muted text); a link shows a thin underline on hover and focus, with none at rest. |
| `author` | `PostAuthor` | None | { name, image? } (PostAuthor): a small Avatar (the photo, else the initials) and the name, alone in the footer. Without it there is no footer. The photo is decoration: the name is beside it. |
| `readingTime` | `string` | None | Your own text, such as "5 min read", last in the meta line, after the topic and the date. |
| `locale` | `string` | `"en"` | The date's language, such as "de" (formatDate in lib/date.ts). The recipes pass theirs. |
| `headingTag` | `"h2" \| "h3" \| "h4" \| "h5"` | None | Required. The title element. Pass childHeadingTag({ heading, headingTag }) from lib/heading.ts, one level under the section heading. |
| `titleClass` | `string` | None | For recipes. Classes for the title, such as a larger role (PostFeatured sets text-subhead). |
| `class` | `string` | None | More classes for the root <article> (a kit Card), merged with cn(), so yours win on conflicts. The card is relative and fills its grid row (h-full), so the footers line up. |
Any other attribute goes on the root <article>.
## Accessibility
- Renders one <article>: put it in an <li> in a Posts list.
- The title is a heading one level under the section heading: pass childHeadingTag, so a reader can jump from post to post.
- The title is the only link to the post. Its click area covers the card, so a click anywhere opens the post, and the focus ring goes round the card; the title names the link. There is no "Read more".
- The topic is a separate link, above the card's click area. It leads the meta line above the title, so Tab reaches it before the title: the Tab order follows the reading order.
- The date is a <time> with a machine date (datetime="2026-10-14"), whatever the text says.
- The picture has empty alt text, since the title says what the post is. The author's photo or initials are hidden from screen readers: the name is text beside them.
For one post as a card: its picture, the topic and date, the title, a short excerpt and the author. The post recipes use it for you.
Drag the orange handle to set the width. Frames get real breakpoints.
Two posts, each a PostCard in an <li>. The first has everything: the picture, the meta line (the topic link, the date and the reading time, a dot between each two), the title, an excerpt cut at three lines, and a footer with the author's photo and name. The second has no picture and no excerpt, and its topic is plain text: the card is shorter, and the two footers still line up on the bottom edge. The post recipes build their cards from it, so you only need it for your own layout.

Process 6 min read
The twelve checks we run the week before a site goes live, from redirects and page titles to the contact form and the 404 page.
News
examples/postcard/main.astro
---
import PostCard from "@astronomic-dev/ui/components/PostCard.astro";
import Posts from "@astronomic-dev/ui/components/Posts.astro";
import { childHeadingTag } from "@astronomic-dev/ui/lib/heading.ts";
// Your own pictures.
import ada from "../../photos/portrait-curly-hair.webp";
import desk from "../../photos/studio-desk.webp";
const heading = "From the blog";
// One level under the section heading: h2 gives h3.
const tag = childHeadingTag({ heading });
---
<div class="mx-auto max-w-6xl">
<Posts heading={heading} listClass="grid-cols-[repeat(auto-fit,minmax(min(100%,18rem),1fr))] gap-cards">
<li class="grid min-w-0">
<PostCard
href="#launch-checklist"
title="A launch checklist for a small studio site"
date="2026-10-14"
readingTime="6 min read"
excerpt="The twelve checks we run the week before a site goes live, from redirects and page titles to the contact form and the 404 page."
image={{ src: desk }}
topic={{ label: "Process", href: "#topic-process" }}
author={{ name: "Ada Brook", image: { src: ada } }}
headingTag={tag}
/>
</li>
<li class="grid min-w-0">
<PostCard href="#studio-news" title="Tomás Vidal joins Astronomic as project manager" date="2026-09-28" topic={{ label: "News" }} author={{ name: "Sam Okafor" }} headingTag={tag} />
</li>
</Posts>
</div>