One story in a news or magazine layout, in five shapes: overlay (title over the photo), stack (photo, then title), row (small thumbnail), list (wide thumbnail with excerpt) and text. Each is an article whose title link covers the card — one tab stop — with the section badge as its own link above it. Byline: author, time[datetime], comment count (announced in full), reading time. Server component.
Port orders four electric cranes and a shore-power berth
The 61-million-euro package is the largest since the container terminal opened.
A sensor plant in the free zone will hire 400 engineers
Production of marine sensors starts in the spring.
Seagrass meadows are back in the bay, divers count
Volunteer surveys find twice the cover of 2021 along the eastern shore.
Installation
The whole kit as one package — get updates by bumping the version. Add the styles to globals.css: @import "@vamos-ui/react/styles.css";
Usage
import { PostCard, type NewsPost } from "@vamos-ui/react/blocks";
// NewsPost is a superset of BlogList's PostSummary: the same CMS mapping feeds both.
<PostCard post={post} variant="overlay" size="xl" priority />
<PostCard post={post} variant="stack" excerpt />
<PostCard post={post} variant="row" />
<PostCard post={post} variant="text" rank={1} meta={{ author: false }} />Overlay text sits on a bottom-weighted scrim; titles are clamped to four lines in small cells.
Hover underlines the title (an animated 1px rule) and nudges the photo; both are off under reduced motion.
Examples
Ranked text cards, Turkish
rank prints a large number before the title (hidden from screen readers: the list order carries it). newsLabelsTr translates the byline, comments and reading time.
API
PostCard
| Prop | Type | Default |
|---|---|---|
posthref, title, excerpt?, cover?, category? { label, href? }, publishedAt, updatedAt?, author? { name, href? }, commentCount?, readingMinutes?, format? (video | gallery | live), id?. | NewsPost | — |
variantCard shape. | "overlay" | "stack" | "row" | "list" | "text" | "stack" |
sizeTitle scale: xl/lg in the display face, md/sm in the text face. | "xl" | "lg" | "md" | "sm" | by variant |
excerptShow the standfirst (stack, list, text). | boolean | false |
meta{ author, date, comments, readingTime } toggles; false hides the byline. | PostMetaFields | false | all on |
categoryShow the section badge. | boolean | true (row: false) |
rankLarge rank number before the title (most-read lists). | number | — |
headingLevelTitle level — one below the module heading. | 2 | 3 | 4 | 3 |
aspectCrop of the cover. | "16:10" | "3:2" | "4:3" | "1:1" | "16:9" | — |
filloverlay: fill the parent box (grid cells) instead of keeping the ratio. | boolean | — |
priority / sizesImage loading hints (the lead story is the LCP). | boolean / string | — |
locale / labels / components / classNamelabels: NewsBlockLabels (newsLabelsTr for Turkish). | … | — |
PostMeta · CategoryBadge · ModuleHeading · NewsDate
| Prop | Type | Default |
|---|---|---|
—The card's byline row, section badge, the section heading with a heavy rule (lg / sm) and the date element, for your own layouts. | server components | — |
newsArticleJsonLd(post, opts) · newsItemListJsonLd(posts, opts)
| Prop | Type | Default |
|---|---|---|
optsNewsArticle (with NewsMediaOrganization publisher) and ItemList nodes for <JsonLd>. | { origin?, publisher?: { name, logo?, url? }, name? } | — |