Fading Vertical Timeline
Two-column layout with a serif title on the left and a thin vertical rule on the right with dot markers. Entries show a date and a paragraph. Past or upcoming entries are greyed to a faint tone and the current one is black with a solid dot.
Rebuilt from arc.net in the Obsidian Farewell Editorial style.
npx shadcn@latest add https://justyoink.it/r/obsidian-farewell-editorial/blocks/vertical-timeline.json
Looks exactly like arc.net: brings its fonts and colours, namespaced so your own theme stays untouched.
npx shadcn@latest add https://justyoink.it/r/obsidian-farewell-editorial/mine/vertical-timeline.json
Restyled to your project: uses your shadcn colours, fonts and radius, so it matches the rest of your app. Layout, type sizes and motion stay as designed.
Usage
Pass `title` and an `entries` array of {date, body}. The entry whose top has passed ~55% of the viewport turns black with a solid dot; the others fade to faint over 0.7s.
components/vertical-timeline.tsx
import { useEffect, useRef, useState } from "react"; type Entry = { date: string; body: string }; type Props = { title?: string; entries?: Entry[]; }; const DEFAULT_ENTRIES: Entry[] = [ { date: "March 4", body: "The beta program for Harbor Notes closes to new sign-ups this week. Everyone already enrolled keeps full access while we prepare the next stage of the rollout.", }, { date: "May 18", body: "Shared folders move to read-only mode on the web app. Exports remain available from the settings page, and the mobile apps keep syncing personal notes as before.", }, { date: "July 9", body: "Legacy workspaces will be archived and their contents removed after a thirty day grace period. Download anything you want to keep before the archive date arrives.", }, ]; export default function FadingVerticalTimeline({ title = "Roadmap", entries = DEFAULT_ENTRIES, }: Props) { const refs = useRef<(HTMLLIElement | null)[]>([]); const [active, setActive] = useState(0); useEffect(() => { const onScroll = () => { const line = window.innerHeight * 0.55; let idx = 0; refs.current.forEach((el, i) => { if (el && el.getBoundingClientRect().top < line) idx = i; }); setActive(idx); }; onScroll(); window.addEventListener("scroll", onScroll, { passive: true }); window.addEventListener("resize", onScroll); return () => { window.removeEventListener("scroll", onScroll); window.removeEventListener("resize", onScroll); }; }, []); return ( <section className="bg-canvas px-6 py-24 md:py-32"> <div className="mx-auto grid max-w-5xl gap-12 md:grid-cols-2"> <h2 className="font-display text-display text-ink-soft">{title}</h2> <ol className="relative"> <span aria-hidden className="absolute left-[5px] top-3 bottom-0 w-px bg-hairline" /> {entries.map((e, i) => { const on = i === active; return ( <li key={e.date} ref={(el) => { refs.current[i] = el; }} className="relative pb-16 pl-14 last:pb-0" > <span aria-hidden className={`absolute left-0 top-2 h-[11px] w-[11px] rounded-pill transition-colors duration-700 ease-in-out ${on ? "bg-ink" : "bg-hairline"}`} /> <div className={`transition-colors duration-700 ease-in-out ${on ? "text-ink" : "text-faint"}`}> <h3 className="text-subhead">{e.date}</h3> <p className={`mt-3 max-w-md text-body transition-colors duration-700 ease-in-out ${on ? "text-muted" : "text-faint"}`}> {e.body} </p> </div> </li> ); })} </ol> </div> </section> ); }import { useEffect, useRef, useState } from "react"; type Entry = { date: string; body: string }; type Props = { title?: string; entries?: Entry[]; }; const DEFAULT_ENTRIES: Entry[] = [ { date: "March 4", body: "The beta program for Harbor Notes closes to new sign-ups this week. Everyone already enrolled keeps full access while we prepare the next stage of the rollout.", }, { date: "May 18", body: "Shared folders move to read-only mode on the web app. Exports remain available from the settings page, and the mobile apps keep syncing personal notes as before.", }, { date: "July 9", body: "Legacy workspaces will be archived and their contents removed after a thirty day grace period. Download anything you want to keep before the archive date arrives.", }, ]; export default function FadingVerticalTimeline({ title = "Roadmap", entries = DEFAULT_ENTRIES, }: Props) { const refs = useRef<(HTMLLIElement | null)[]>([]); const [active, setActive] = useState(0); useEffect(() => { const onScroll = () => { const line = window.innerHeight * 0.55; let idx = 0; refs.current.forEach((el, i) => { if (el && el.getBoundingClientRect().top < line) idx = i; }); setActive(idx); }; onScroll(); window.addEventListener("scroll", onScroll, { passive: true }); window.addEventListener("resize", onScroll); return () => { window.removeEventListener("scroll", onScroll); window.removeEventListener("resize", onScroll); }; }, []); return ( <section className="bg-background px-6 py-24 md:py-32"> <div className="mx-auto grid max-w-5xl gap-12 md:grid-cols-2"> <h2 className="font-sans text-obsidian-display text-muted-foreground">{title}</h2> <ol className="relative"> <span aria-hidden className="absolute left-[5px] top-3 bottom-0 w-px bg-border" /> {entries.map((e, i) => { const on = i === active; return ( <li key={e.date} ref={(el) => { refs.current[i] = el; }} className="relative pb-16 pl-14 last:pb-0" > <span aria-hidden className={`absolute left-0 top-2 h-[11px] w-[11px] rounded-full transition-colors duration-700 ease-in-out ${on ? "bg-foreground" : "bg-border"}`} /> <div className={`transition-colors duration-700 ease-in-out ${on ? "text-foreground" : "text-muted-foreground"}`}> <h3 className="text-obsidian-subhead">{e.date}</h3> <p className={`mt-3 max-w-md text-obsidian-body transition-colors duration-700 ease-in-out ${on ? "text-muted-foreground" : "text-muted-foreground"}`}> {e.body} </p> </div> </li> ); })} </ol> </div> </section> ); }
Quality checks
Automated, in a real browser · 4d ago- Accessible: not passedElements must meet minimum color contrast ratio thresholds (4 elements)
- Responsive: passedRenders at phone (390px), tablet (768px) and desktop width without sideways scrolling.
- Dark mode: passedStill readable when installed in your theme and switched to dark mode.
- Themeable: passedUses design tokens rather than hard-coded colours, so it follows your theme cleanly.
- Animates cleanly: passedIts animation plays and finishes with everything visible, and it stays still for people who turn on reduced motion.