Staaarter

Center-Line Journey Timeline

A feature section that runs a hairline down the middle of the section and alternates its stages either side of it, dropping an image tile inside a live phone frame onto the step worth showing rather than describing in text.

By Staaarter Team
Feature
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its media-slot dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/center-line-journey-timeline.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/feature/feature2.tsx instead.

Usage

The file also exports feature2Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Feature2, feature2Demo } from "@/components/blocks/feature/feature2";

export default function Page() {
  return <Feature2 {...feature2Demo} />;
}

Props

PropTypeDefaultDescription
eyebrowstringnoneSmall label above the heading.
headingReactNodenoneSection heading, centered above the timeline.
descriptionstringnoneSupporting copy under the heading.
stepsJourneyStep[]noneStages of the timeline, alternating sides in array order.
classNamestringnoneExtra classes for the outer section element.

Types

type JourneyStep = {
  title: string;
  description: string;
  /** Only the step worth showing should set this; renders a phone-frame image tile instead of plain text. */
  media?: { src: string; alt: string };
};

Behavior notes

  • This is a static, server-rendered section: the hairline, dots, and alternating layout are all plain CSS, nothing here is interactive.
  • Any step whose media field is set renders as a decorative phone-frame mockup (a rounded border shell with the image inside) instead of a text card; steps without media render a plain title/description card.
  • Sides alternate strictly by array index (even index on one side, odd on the other), independent of which steps happen to have media.
  • The phone frame is a hand-built div shell, not a real interactive device preview.