Long guide toc rail — Article block
Proarticle-long-guide-toc-rail · for article pages
Long guide toc rail
A long guide with several headings: a sticky "on this page" rail with the article’s dates beside the text
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/article-long-guide-toc-railUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import ArticleLongGuideTocRail from '@/components/trame/blocks/article/article-long-guide-toc-rail.vue'
const props = {
breadcrumb: [
{
label: "Home",
action: "home"
},
{
label: "Journal",
action: "journal"
}
],
title: "Caring for a waxed canvas bag: a five-step guide",
standfirst: "What to do, what to avoid, and when it’s time to send it to us.",
author: {
name: "Camille Roussel",
role: "Workshop manager"
},
date: "2026-09-24",
updated: "2026-10-05",
readingTime: "4 min read",
tags: [
"Care",
"Waxed canvas"
],
cover: "https://images.unsplash.com/photo-1602845860431-35374f24f48d?w=1600&q=80",
coverAlt: "A mustard canvas backpack with leather straps, resting in the grass",
body: [
{
type: "paragraph",
text: "A waxed canvas bag wakes up every fall: the rain comes back, the dust of your commute builds up, and the wax slowly wears away. Here’s what we do in the workshop, and what you can do at home without any special gear."
},
{
type: "heading",
text: "Clean without stripping the wax"
}
],
related: [
{
id: "r1",
title: "Repair rather than replace: what our workshop covers",
excerpt: "An honest list of what we repair.",
image: "https://images.unsplash.com/photo-1531188929123-0cfa61e6c770?w=1600&q=80",
alt: "A hand punching holes in leather with a pricking iron",
section: "Repair"
},
{
id: "r2",
title: "Linen, a fiber that gets better with age",
excerpt: "Why it wrinkles, and why that’s a good thing.",
image: "https://images.unsplash.com/photo-1528458909336-e7a0adfed0a5?w=1600&q=80",
alt: "Natural beige linen, up close",
section: "Materials"
}
],
open: "article"
}
</script>
<template>
<ArticleLongGuideTocRail v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| breadcrumb | Breadcrumb[] | Datathe path to this article, from the home page; the last item is the article itself |
| title* | string | Wordsthe article’s title |
| standfirst | string | Wordsthe one or two sentences under the title that say what the article is about |
| author | Author | Datathe writer, as the merchant named them; none: no byline |
| date | string | Wordsthe publication date: an ISO date (2026-10-02) is written out in the visitor’s language, other text is shown as is |
| updated* | string | Wordsthe date of the last revision: a guide shows when it was last checked |
| readingTime | string | Wordsas the merchant states it ("7 min read") |
| tags | string[] | Wordsa topic |
| cover | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| coverAlt | string | Wordswhat the cover shows |
| body* | (Body | Body | Body | Body | Body | Body | Body | Body | Body)[] | the article, as typed blocks: paragraph, heading, quote, image, list, facts, table, note, step |
| summary | Summary[] | a strip of key facts at the top of a how-to |
| related | Related[] | Datathe next articles to read: two or three |
| open | string | Actionthe action that opens one related article; the article is its record |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Breadcrumb breadcrumb[] · 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 |
Author 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 |
Summary summary[] · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Words("Duration", "Equipment") |
| value* | string | Wordsits value |
Related related[] · 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 related[].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 |
|---|---|---|
| measure | 'narrow' | 'normal' | 'wide' | how wide the text column is: narrow, normal or wide |
| 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
- No motion; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
breadcrumb[],open - Reads
articlesfrom your app
A article section, for article pages; it uses @lucide/vue, @vueuse/core.
More article blocks
- Layout steps: a how-to: a strip of key facts, then numbered steps each with its picture.
- List cards: the entries as cards in a grid: a list to scan, each entry short and with a picture.
- List numbered: a numbered article read top to bottom: a number in the margin, the entry, an optional picture beside it.
- List ranked: big numerals and pictures alternating sides: a ranking or a countdown the visitor reads with pleasure.
- Passage strip cards: Equal excerpt cards for real extracts of linked articles only.
- Passage strip stacked big: One large opening extract and a quiet reading list, for real linked extracts only.
- Quiz all at once: every question in one column, the score at the end: a short quiz read like an article.
- Quiz cards: questions as cards side by side: a light quiz of three to six questions that invites a try.