MenuClose

Block Timeline — React Page Block

Company or product timeline: a vertical rail that draws itself in on scroll, alternating left/right on wide screens and collapsing to one rail on small ones.

View source
PreviewReact
Starting live preview

Usage

import { BlockTimeline } from "@/components/BlockTimeline";

export function History() {
  return (
    <BlockTimeline
      title="How we got here."
      events={[
        { date: "2023", title: "First graph", text: "A whiteboard and a cron job." },
        { date: "2025", title: "Replays", text: "One scrubbable timeline." },
      ]}
      {...{
        title: "How we got here.",
        accent: "#d5ed9a",
        scheme: "dark"
      }}
    />
  );
}
Implementation notes & API

Purpose: company/product timeline. Copy it, ship it — every string, link and color arrives through props. Runtime: pure DOM + CSS. No WebGPU, canvas, animation library or external assets; SSR-safe on first render. Theming: root custom properties (--vb-bg, --vb-fg, --vb-accent, --vb-border, --vb-radius, --vb-container) or the accent/scheme/className/style props. scheme flips the dark default to light. Guardrails: responsive via container queries down to 320px; interactive behavior degrades on touch; prefers-reduced-motion drops entrance/scroll motion while content stays complete. The rail draws once when the section enters the viewport; reduced motion shows the settled timeline immediately.

PropertyTypeNotes / default
eyebrow / title / descriptionReactNodeSection header
eventsreadonly TimelineEvent[]{ date, title, text, tags? }
demoNoteReactNode | nullFictional-history marker; pass null with real events
scheme"dark" | "light"dark
accentstring (hex)Sets --vb-accent for the whole block
className / stylestring / CSSPropertiesApplied to the section root
childrenReactNodeReplaces the default content entirely
View source on GitHubFree for commercial projects · MIT