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.
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.jsonPrefer 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
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Frequently asked questions" | Section heading. |
| description | string | "A quick walkthrough..." | Supporting copy under the heading. |
| items | FaqItem[] | none | Question and answer pairs, rendered in order along the timeline. |
| className | string | none | Extra 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`.
More FAQ Blocks
View all →collapsible-accordion
Collapsible Accordion
Stacked cards with expandable sections, for full-length answers in a compact format.
open-list-layout
Open List Layout
Questions with answers displayed directly below in a simple always-open list.
three-column-grid
Three Column Grid
Q&A pairs arranged in a responsive grid layout, always open.
tabbed-categories
Tabbed Categories
Sidebar navigation with category tabs and an accordion of that category's questions.
searchable-accordion
Searchable Accordion
Search input that filters accordion items in real-time by question and answer text.
grouped-sections
Grouped Sections
FAQs organized into titled sections, each with its own independent accordion below it.