Launch priceOne payment

Scroll Thread

A process, a timeline or a story in steps, with a single curving thread that draws itself as the reader scrolls and lights each step when it reaches it. It follows the page, or scrolls inside its own panel with `contained`.

CreativeFree226 lines · one file

Ready for AI tools one file typed props installs by name prompt included

The decision inside it

The thread is measured through the steps

The path is routed through where each step's heading actually lands, so long and short steps keep their node at any width and after any re-wrap. A fixed SVG path drifts off its steps at the first breakpoint. Reduced motion draws it complete.

Installation

How you get it

Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.

Use Layro's Scroll Thread for this.
Install it: npx shadcn@latest add @layro/scroll-thread
(the @layro registry is set up in components.json, with LAYRO_KEY in .env.local)
Import it from @/components/ui/scroll-thread.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.

For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Free components install through the @layro registry with your CLI token: see the Namespaced tab.

When to use it

Use Scroll Thread for a sequence read top to bottom: a changelog, a how-it-works, a story. The line draws down to the step you are reading.

Usage

components/changelog.tsx
import { ScrollThread } from "@/components/ui/scroll-thread";

const RELEASES = [
  { eyebrow: "Oct 14 · v2.4", title: "Agent approvals on mobile", body: "Approve or reject a run from your phone." },
  { eyebrow: "Sep 30 · v2.3", title: "Billing pages, twice as fast", body: "Invoices load before the first paint." },
];

export function Changelog() {
  return <ScrollThread items={RELEASES} />;
}

API

“Copy prompt” above puts a full brief on your clipboard — install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

PropTypeNotes
itemsrequiredScrollThreadItem[]—
containedbooleanScroll inside its own box rather than with the page.
heightnumberHeight of the box when `contained`, in px. Default 440.
threadClassNamestringColour class for the drawn thread, read as `text-*`. Default blue.

Dependencies

npm packages

clsxframer-motiontailwind-merge

Layro foundations, installed alongside it

layro-theme

Lifetime access

Every component, and everything we ship next.

  • All 132 components, source included
  • Every template, and everything released after you buy
  • shadcn CLI or download — React 18/19, Tailwind v4
  • One payment. No subscription.

More in Creative

All Creative components