Visual chronicle sticky year — Timeline block

Pro

timeline-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-year

Usage

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.

PropTypeDescription
title*stringWordswhat the story is ("Our story in dates")
leadstringWordsone sentence introducing it
entries*Entry[]the merchant’s own milestones, oldest first
footnotestringWordsa line stating a limit or a promise ("We keep the bad years too.")
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Entry entries[] · 5 props
PropTypeDescription
year*stringWordsthe date as the merchant writes it ("2012", "March 2018"): never computed
title*stringWordswhat happened, in a few words
textstringWordsone or two sentences, including what went wrong when it did
imagestringPicturea picture: a root-relative path (/media/…) or an absolute URL
altstringWordsthe picture’s description
Options options · 1 props
PropTypeDescription
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
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

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.

All 9 timeline blocks