Visual chronicle sticky year — Timeline block
Protimeline-visual-chronicle-sticky-year · for about pages
Visual chronicle sticky year
The year of the entry in view set huge in a column that stays in place while the entries (picture, title, words) scroll beside it: a long history, a house or a family business where the passing years are the theme; the merchant’s own only.
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/timeline-visual-chronicle-sticky-yearUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import TimelineVisualChronicleStickyYear from '@/components/trame/blocks/timeline/timeline-visual-chronicle-sticky-year.vue'
const props = {
title: "Our story in dates",
lead: "What worked, what didn’t, and what we took from it.",
entries: [
{
year: "2012",
title: "A workbench and a machine",
text: "Camille opens the workshop in a borrowed garage and sews the first bags in the evenings.",
image: "https://images.unsplash.com/photo-1787005241178-c9006ea9610b?w=1600&q=80",
alt: "Hands tracing the outline of a template in pencil on a piece of leather"
},
{
year: "2013",
title: "The first model sold",
text: "The “Brise” bag goes on sale in a run of twenty. After a month, only one is left in stock.",
image: "https://images.unsplash.com/photo-1657603738389-951c374b740c?w=1600&q=80",
alt: "A cognac leather satchel with two pockets and its shoulder strap, on a light background"
}
],
footnote: "We keep the bad years too: they taught us as much as the good ones."
}
</script>
<template>
<TimelineVisualChronicleStickyYear v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordswhat the story is ("Our story in dates") |
| lead | string | Wordsone sentence introducing it |
| entries* | Entry[] | the merchant’s own milestones, oldest first |
| footnote | string | Wordsa line stating a limit or a promise ("We keep the bad years too.") |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Entry entries[] · 5 props
| Prop | Type | Description |
|---|---|---|
| year* | string | Wordsthe date as the merchant writes it ("2012", "March 2018"): never computed |
| title* | string | Wordswhat happened, in a few words |
| text | string | Wordsone or two sentences, including what went wrong when it did |
| image | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt | string | Wordsthe picture’s description |
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 |
| asset | a picture’s address as your app serves it |
| 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
A timeline section, for about pages; it uses clsx, motion, tailwind-merge.
More timeline blocks
- History chapters: a vertical rail with year, title and paragraph per milestone: a story with a few chapters to read in order; the merchant’s own only.
- History figures list: large year numerals in a column, title and text beside them: two to six milestones that deserve weight; the merchant’s own only.
- History horizontal rail: one rule across the page with a dot per milestone, the year above and the words under it, scrolling sideways past eight; a vertical rail on a phone: four to eight short milestones that read best as one line; the merchant’s own only.
- History year ledger: one line per year in a boxed table: eight to twelve short milestones; the merchant’s own only.
- Object chronicle split: one picture of the first product beside its dated changes: the history of a single object; the merchant’s own only.