Series shelf cards — Blog block
Problog-series-shelf-cards · for journal, article pages
Series shelf cards
One card per series with its parts, total time and status: a journal that publishes in series
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-series-shelf-cardsUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import BlogSeriesShelfCards from '@/components/trame/blocks/blog/blog-series-shelf-cards.vue'
const props = {
title: "Our series",
lead: "Five reads, in this order, to understand how we work.",
steps: [
{
id: "s1",
title: "Why a bag lasts, or doesn’t",
excerpt: "The three places where a bag gives way, and how to spot them before you buy.",
minutes: 6
},
{
id: "s2",
title: "How we choose our leathers",
excerpt: "A visit to the tannery and the criteria we never compromise on.",
minutes: 7
}
],
status: "In progress",
series: [
{
id: "cuirs",
title: "The leather series",
summary: "From the tannery to aftercare, in four episodes.",
image: "https://images.unsplash.com/photo-1637759292654-a12cb2be085e?w=1600&q=80",
alt: "Cognac-brown leather, a close-up of a fold and a seam",
status: "Complete",
steps: [
{
id: "s1",
title: "Why a bag lasts, or doesn’t",
excerpt: "The three places where a bag gives way, and how to spot them before you buy.",
minutes: 6
},
{
id: "s2",
title: "How we choose our leathers",
excerpt: "A visit to the tannery and the criteria we never compromise on.",
minutes: 7
}
]
},
{
id: "atelier",
title: "A year in the workshop",
summary: "The team’s logbook, month after month.",
image: "https://images.unsplash.com/photo-1721664195489-7448042bf305?w=1600&q=80",
alt: "Hands tracing a pattern",
status: "In progress",
steps: [
{
id: "s5",
title: "Repair rather than replace",
excerpt: "What the repair workshop covers.",
minutes: 3
},
{
id: "s6",
title: "Five trips, one bag",
excerpt: "Readers tell us how they made theirs last.",
minutes: 6
}
]
}
]
}
</script>
<template>
<BlogSeriesShelfCards v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe block’s title ("Where to start", "The series on leathers") |
| lead | string | Wordsone sentence under the title |
| steps* | Step[] | Datathe articles in reading order |
| series | Sery[] | Dataseveral series: leave empty to show the steps as one series |
| status | string | Wordswhere the series stands, as the merchant says it ("Full", "In progress") |
| open | string | Actionthe action that opens one step; the article is its record |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Step steps[] · 10 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" |
| minutes | number | the reading time in minutes: the block adds them up, it never guesses them |
Author steps[].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 |
Sery series[] · 7 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | the series’s id |
| title* | string | Wordsthe series’ name |
| summary | string | Wordswhat the series covers, in a sentence |
| image | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt | string | Wordswhat the picture shows |
| status | string | Wordswhere the series stands, as the merchant says it ("Full", "In progress") |
| steps* | Step[] | the series’s steps, in order |
Step series[].steps[] · 10 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" |
| minutes | number | the reading time in minutes: the block adds them up, it never guesses them |
Author series[].steps[].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 |
Options options · 2 props
| Prop | Type | Description |
|---|---|---|
| showTotal | boolean | whether the number of parts 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 |
| asset | a picture’s address as your app serves it |
| 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 - Reads
articlesfrom your app
A blog section, for journal, article pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.
More blog blocks
- Reading path numbered rail: a vertical rail of numbered steps with a line of why for each: a newcomer’s guided tour of the journal.
- Section page chips grid: a section with several siblings: a row of filter links above a grid of cards.
- Section page featured then list: a section led by one article: the newest in full, the rest as a plain list below.
- Section page masthead list: a section with a strong identity: a large title, its description and count, then boxed rows with the author’s line.
- Topic index guide cards: picture cards for how-tos, each with its practical line: a journal of guides and tutorials.
- Topic index tiles icon: tiles with an icon, a count and a one-sentence scope: a journal with a handful of clear themes.
- Topic rails cards rail: a swipeable row of picture cards for each topic, with its "see all": a journal with strong covers.
- Topic rails lead per topic: each topic opens on one large story, the others in a row beside it: a magazine with sections.