Staaarter

Timeline Layout

FAQ cards connected by a central vertical line, alternating left and right of the line on large screens with a small circle marker at each card's vertical midpoint. Stacks into a single column with the line on the left on smaller screens.

By Staaarter Team
FAQ
Docs
Live preview

Docs

Installation

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

npx shadcn add https://staaarter.com/r/timeline-layout.json

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

Usage

The file also exports faq18Demo, 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 { Faq18, faq18Demo } from "@/components/blocks/faq/faq18";

export default function Page() {
  return <Faq18 {...faq18Demo} />;
}

Props

PropTypeDefaultDescription
headingstring"Frequently asked questions"Section heading.
descriptionstring"A quick walkthrough..."Supporting copy under the heading.
itemsFaqItem[]noneQuestion and answer pairs, rendered in order along the timeline.
classNamestringnoneExtra classes for the outer section element.

Types

interface FaqItem {
  question: string;
  answer: string;
}

Behavior notes

  • Purely presentational, all answers are always visible, there's no expand/collapse behavior.
  • The alternating left/right layout only applies at the `lg` breakpoint via `lg:flex-row-reverse` on odd rows, below that every item stacks in a single column with the line and markers on the left.
  • The vertical line and circle markers are absolutely positioned decorative elements marked `aria-hidden`.