Latest lines — Blog block
Problog-latest-lines · for home, journal, article, product pages
Latest lines
One line per article, date and title, no excerpt: a teaser at the foot of a page or of a product
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-latest-linesUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import BlogLatestLines from '@/components/trame/blocks/blog/blog-latest-lines.vue'
const props = {
title: "Latest articles",
lead: "What we learn in the workshop, written season by season.",
articles: [
{
id: "a1",
title: "How we choose our leathers, and why we turn half of them down",
excerpt: "A visit to the tannery, three criteria we never compromise on, and what that means for the price.",
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",
section: "Materials",
author: {
name: "Camille Roussel"
},
date: "2026-10-02",
readingTime: "7 min"
},
{
id: "a2",
title: "Caring for a waxed canvas bag: a five-step guide",
excerpt: "What to do, and above all what to avoid.",
image: "https://images.unsplash.com/photo-1602845860431-35374f24f48d?w=1600&q=80",
alt: "A mustard canvas backpack with leather straps, resting in the grass",
section: "Care",
author: {
name: "Camille Roussel"
},
date: "2026-09-24",
readingTime: "4 min"
}
],
cta: {
label: "See all articles",
action: "journal"
},
open: "article"
}
</script>
<template>
<BlogLatestLines v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe list’s title ("Latest articles", "Also worth reading") |
| lead | string | Wordsone sentence under the title, if the list needs one |
| articles* | Article[] | Datathe articles to list, newest first |
| cta | Cta | the entry to every article ("See all") |
| open | string | Actionthe action that opens one article; the article is its record |
| filters | Filter[] | Datathe sections, as links to their pages: with their article count when the shop knows it |
| activeFilter | string | Designthe id of the section being viewed, if any |
| pageSize | number | Datahow many articles to show before the entry to the rest |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Article articles[] · 9 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" |
Author articles[].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 |
Filter filters[] · 6 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | Datathe record’s id in the tool that answers it |
| name* | string | Wordsthe category’s name |
| image | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt | string | Wordswhat the category’s picture shows |
| count | number | how many products it holds |
| summary | string | Wordsone short line on the category |
Options options · 1 props
| Prop | Type | Description |
|---|---|---|
| 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:
cta,open - Reads
articles,categoriesfrom your app
A blog section, for home, journal, article, product pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.
More blog blocks
- Front page mosaic: a collage of up to four stories with covers (one tall, two square, one wide): a journal whose pictures carry it.
- Guide shelves only: no hero, a heading and shelves of three or four cards, each with "see all": a section of a home page.
- Guide shelves tabs: one shelf at a time, the topic tabs swap its guides, the first one large: four to twelve guides in a small space.
- Journal masthead: a journal that sells itself as a title: the name very large and centred between hairlines, the lead beside its cover, other stories in ruled text columns.
- Lead and rail: the usual blog home: one large lead story and two or three short stories stacked beside it.
- More to read side column: the writer and the newsletter in the main column, a side column of related links and the most read the journal itself ranks: a news-like article.
- Next in series lead card: one large "read next" card with its cover and, for a series or an issue, the list of its articles: a series or a numbered issue.
- Past issues numbered list: numbered issues with their date and one line, a subscribe card beside them: a letter or a periodical.