Staaarter

Story Rail About

A narrow sticky rail of chapter markers sits beside a longer story column, which ends in an offset, captioned image. Suited to a fuller company history than a single-screen section.

By Staaarter Team
About
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/story-rail-about.json

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

Usage

The file also exports about41Demo, 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 { About41, about41Demo } from "@/components/blocks/about/about41";

export default function Page() {
  return <About41 {...about41Demo} />;
}

Props

PropTypeDefaultDescription
eyebrowstringundefinedSmall label above the rail items.
railItemsRailItem[][]Numbered chapter markers in the sticky rail column.
headingstringnoneStory column heading.
paragraphsstring[]noneBody paragraphs of the story.
imageMediaSlotImageundefinedCaptioned image below the story text; falls back to a placeholder via MediaSlot.
captionstringundefinedCaption shown under the image.
classNamestringnoneExtra classes for the outer section element.

Types

type RailItem = { index: string; label: string };

Behavior notes

  • The rail column becomes `lg:sticky lg:top-24` only from the lg breakpoint up; on narrow screens it sits above the story as a normal block, so no JS scroll-listener is involved anywhere.
  • Unlike About15's single centered letter column, this block is intentionally two-column and asymmetric, with a 220px rail fixed beside a fluid story column rather than one narrow max-width block.
  • The captioned image is offset with `sm:ml-12` so it reads as inset into the story text rather than full-width like About13's lead image, and its figcaption is optional independent of whether an image is supplied.