Article browser sidebar — Blog block

Pro

blog-article-browser-sidebar · for home, journal, article, product pages

Article browser sidebar

The list beside a column to browse by section and, if the shop ranks them, the most read

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-article-browser-sidebar

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import BlogArticleBrowserSidebar from '@/components/trame/blocks/blog/blog-article-browser-sidebar.vue'

const props = {
title: "Latest articles",
lead: "Houses, renovations and site notes from Halden Roe Architects.",
articles: [
{
id: "a1",
title: "A concrete house that turns pink at dusk",
excerpt: "Board-formed walls, timber screens and one long window to the west: how a hillside plot shaped the whole plan.",
image: "https://images.unsplash.com/photo-1608619769165-25647672335f?w=1600&q=80",
alt: "A concrete and timber house at dusk under a pink sky",
section: "Houses",
author: {
name: "Ingrid Halden"
},
date: "2026-10-02",
readingTime: "7 min"
},
{
id: "a2",
title: "Glass walls in a garden: designing for four seasons",
excerpt: "Shade, heat and privacy, and what we changed after the first winter.",
image: "https://images.unsplash.com/photo-1598714805247-5dd440d87124?w=1600&q=80",
alt: "A house with glass walls at the end of a garden in autumn",
section: "Houses",
author: {
name: "Tomas Roe"
},
date: "2026-09-24",
readingTime: "4 min"
}
],
cta: {
label: "See all articles",
action: "journal"
},
open: "article",
filters: [
{
id: "maisons",
name: "Houses",
count: 3
},
{
id: "atelier",
name: "Studio life",
count: 4
}
],
activeFilter: "maisons",
popular: [
{
id: "a2",
title: "Glass walls in a garden: designing for four seasons",
excerpt: "Shade, heat and privacy, and what we changed after the first winter.",
image: "https://images.unsplash.com/photo-1598714805247-5dd440d87124?w=1600&q=80",
alt: "A house with glass walls at the end of a garden in autumn",
section: "Houses",
author: {
name: "Tomas Roe"
},
date: "2026-09-24",
readingTime: "4 min"
},
{
id: "a4",
title: "Renovating a kitchen around a single marble island",
excerpt: "What we kept, what we moved, and an honest budget.",
image: "https://images.unsplash.com/photo-1682888813913-e13f18692019?w=1600&q=80",
alt: "A white kitchen with a marble island and stools",
section: "Renovation",
author: {
name: "Tomas Roe"
},
date: "2026-09-03",
readingTime: "3 min"
}
]
}
</script>

<template>
<BlogArticleBrowserSidebar v-bind="props" />
</template>

Props

Each prop says who changes it: Words, Picture, Action, Design, Data.* required.

PropTypeDescription
title*stringWordsthe list’s title ("Latest articles", "Also worth reading")
leadstringWordsone sentence under the title, if the list needs one
articles*Article[]Datathe articles to list, newest first
ctaCtathe entry to every article ("See all")
openstringActionthe action that opens one article; the article is its record
filtersFilter[]Datathe sections, as links to their pages: with their article count when the shop knows it
activeFilterstringDesignthe id of the section being viewed, if any
popularPopular[]Datathe articles the shop itself ranks as most read: leave empty when it keeps no such count
pageSizenumberDatahow many articles to show before the entry to the rest
filterstringActionthe page action a category chip leads to; it receives the category
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Article articles[] · 9 props
PropTypeDescription
id*string | numberDatathe record’s id in the tool that answers it
title*stringWordsthe article’s title
excerptstringWordsa sentence or two from the article
imagestringPicturea picture: a root-relative path (/media/…) or an absolute URL
altstringWordswhat the cover picture shows
sectionstringWordsthe section it belongs to, e.g. "Guides"
authorAuthorwho wrote it
datestringWordswhen it was published, as the site writes it
readingTimestringWordshow long it takes to read, e.g. "6 min"
Author articles[].author · 6 props
PropTypeDescription
idstring | numberDatathe record’s id in the tool that answers it
name*stringWordsthe person’s name
rolestringWordstheir role or job title
companystringWordswhere they work
avatarstringPicturea picture: a root-relative path (/media/…) or an absolute URL
urlstringDesigna page about them
Cta cta · 4 props
PropTypeDescription
label*stringWordsthe link’s words, e.g. "See the collection"
actionstringActiona named action of the page
recordRecord<string, unknown>Datathe record the action applies to, passed to the host with it, if any
urlstringDesignan address outside the app
Filter filters[] · 6 props
PropTypeDescription
id*string | numberDatathe record’s id in the tool that answers it
name*stringWordsthe category’s name
imagestringPicturea picture: a root-relative path (/media/…) or an absolute URL
altstringWordswhat the category’s picture shows
countnumberhow many products it holds
summarystringWordsone short line on the category
Popular popular[] · 9 props
PropTypeDescription
id*string | numberDatathe record’s id in the tool that answers it
title*stringWordsthe article’s title
excerptstringWordsa sentence or two from the article
imagestringPicturea picture: a root-relative path (/media/…) or an absolute URL
altstringWordswhat the cover picture shows
sectionstringWordsthe section it belongs to, e.g. "Guides"
authorAuthorwho wrote it
datestringWordswhen it was published, as the site writes it
readingTimestringWordshow long it takes to read, e.g. "6 min"
Author popular[].author · 6 props
PropTypeDescription
idstring | numberDatathe record’s id in the tool that answers it
name*stringWordsthe person’s name
rolestringWordstheir role or job title
companystringWordswhere they work
avatarstringPicturea picture: a root-relative path (/media/…) or an absolute URL
urlstringDesigna page about them
Options options · 4 props
PropTypeDescription
showExcerptbooleanwhether each article’s excerpt is shown
showAuthorbooleanwhether each article’s author is shown
showThumbbooleanwhether each article’s picture is shown
mood'inverse' | 'brand' | 'warm' | 'tint' | stringa 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).

MemberWhat it is for
hrefthe address an action leads to, or null to hide what leads there
actruns a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error }
canwhether the page has this action
asseta picture’s address as your app serves it
Linkyour router’s link component
cartCountthe cart badge’s number
cartDrawerwhether your app has a cart drawer
cartOpenwhether the cart drawer is open
labelyour 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:

KeyEnglishFrench
newsletter.alreadyYou are already subscribed.Vous êtes déjà inscrit.
newsletter.doneDone: you are subscribed.C’est noté : vous êtes inscrit.
newsletter.invalidCheck the email address.Vérifiez l’adresse e-mail.
newsletter.tooManyToo 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, filter
  • Reads articles, categories from 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

  • Archive month groups: month and count on the side, then day, title and section in a tight row: a journal that publishes often.
  • Archive year groups: a large year in the margin and its pieces in rows: a journal that publishes a few pieces a month.
  • 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.

All 35 blog blocks