Archive year groups — Blog block
Problog-archive-year-groups · for journal pages
Archive year groups
A large year in the margin and its pieces in rows: a journal that publishes a few pieces a month
Documentation
Installation
One command copies the block into your project with the shadcn CLI (the registry is set once: Installation).
pnpm dlx shadcn-vue@latest add @trame/blog-archive-year-groupsUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import BlogArchiveYearGroups from '@/components/trame/blocks/blog/blog-archive-year-groups.vue'
const props = {
title: "The full archive",
lead: "Every Far Meridian field note we’ve published, newest first.",
entries: [
{
id: "e0",
title: "Night markets of the old port: a walking guide",
date: "2026-10-02",
section: "Destinations",
readingTime: "3 min"
},
{
id: "e1",
title: "Twelve hours on the desert road",
date: "2026-09-24",
section: "Field notes",
readingTime: "4 min"
}
]
}
</script>
<template>
<BlogArchiveYearGroups v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe archive’s title ("The whole archive") |
| lead | string | Wordsone sentence under the title |
| entries* | Entry[] | Dataevery published piece, newest first; the block groups them by their ISO date |
| open | string | Actionthe action that opens one entry; the entry is its record |
| groupBy | 'year' | 'month' | how the articles are grouped: by year or by month |
| groupLimit | number | Datahow many groups to show before the entry to the rest: leave empty to show all |
| cta | Cta | the entry to the complete archive ("The whole archive") |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Entry entries[] · 12 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | Datathe record’s id in the tool that answers it |
| title* | string | Wordsthe article’s title |
| excerpt | string | Wordsa sentence or two from the article |
| image | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt | string | Wordswhat the cover picture shows |
| section | string | Wordsthe section it belongs to, e.g. "Guides" |
| author | Author | who wrote it |
| date | string | Wordswhen it was published, as the site writes it |
| readingTime | string | Wordshow long it takes to read, e.g. "6 min" |
| source | string | Wordswhere it was published, when it is not this site ("The Daily Ledger", "Podcast") |
| url | string | Designan address outside the app, for a piece published elsewhere |
| group | string | Wordsthe group it belongs to when its date is not an ISO date ("Spring 2025") |
Author entries[].author · 6 props
| Prop | Type | Description |
|---|---|---|
| id | string | number | Datathe record’s id in the tool that answers it |
| name* | string | Wordsthe person’s name |
| role | string | Wordstheir role or job title |
| company | string | Wordswhere they work |
| avatar | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| url | string | Designa page about them |
Cta cta · 4 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe link’s words, e.g. "See the collection" |
| action | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action applies to, passed to the host with it, if any |
| url | string | Designan address outside the app |
Options options · 2 props
| Prop | Type | Description |
|---|---|---|
| showCategory | boolean | whether each article’s category is shown |
| mood | 'inverse' | 'brand' | 'warm' | 'tint' | string | a band of the page that redefines the theme surfaces inside it |
What it asks your app for
The block never knows your app: it asks it, through one context provided once, where its links lead, what its actions do, how a price reads and which words to say (The host context).
| Member | What it is for |
|---|---|
| href | the address an action leads to, or null to hide what leads there |
| act | runs a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error } |
| can | whether the page has this action |
| Link | your router’s link component |
| cartCount | the cart badge’s number |
| cartDrawer | whether your app has a cart drawer |
| cartOpen | whether the cart drawer is open |
| label | your word for an interface key, or undefined to keep the block’s own |
The words it says itself, in English and French; label(key) replaces any of them:
| Key | English | French |
|---|---|---|
| newsletter.already | You are already subscribed. | Vous êtes déjà inscrit. |
| newsletter.done | Done: you are subscribed. | C’est noté : vous êtes inscrit. |
| newsletter.invalid | Check the email address. | Vérifiez l’adresse e-mail. |
| newsletter.tooMany | Too many attempts, try again in a moment. | Trop de tentatives, réessayez dans un moment. |
Features
- Every word in the server HTML
- Same markup in Vue and React
- Theme tokens only: every theme, light and dark
- Shows what you give it, invents nothing
- Subtle motion: one short reveal; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
open,cta - Reads
articlesfrom your app
A blog section, for journal pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.
More blog blocks
- Article browser sidebar: the list beside a column to browse by section and, if the shop ranks them, the most read.
- Article list cards: covers in a grid, for a landing or a home that wants to show the journal’s look.
- Article list featured: the newest article told large beside the rest as a compact list: a journal’s front page.
- Article list rows: a dense index of articles with their dates, readable without any picture: a journal’s archive page.
- Article list scroll row: five or more articles in one swipeable row, ending on the entry to all of them: a home page.
- Article list timeline: the articles set on a rail, grouped by the month of their date: an archive one reads season by season.
- Chapter strip: a slim strip of chapters with the current one marked: inside an article that belongs to a series.
- Front page centered lead: a brand journal: a centred lead under a wide cover, then a short row of secondary stories with small thumbnails.