Skip to main content
Clever Ops

Dual Axis Chapters

A pinned React stage where one scroll value drives two geared axes, chapters advance vertically while a marker filmstrip slides in counterpoint, with a live mono ratio readout. Tailwind-themed.

Preview & code

Loading Dual Axis Chapters preview

Installation

pnpm dlx shadcn@latest add @cleverui/dual-axis-chapters

Requires the @cleverui registry in your components.json, a one-off, two-line setup.

Usage

tsx
import { DualAxisChapters } from '@/components/blocks/dual-axis-chapters'
Exampletsx
import { DualAxisChapters } from '@/components/blocks/dual-axis-chapters'

export default function DualAxisChaptersDemo() {
  return (
    <div>
      <DualAxisChapters
        slate="Field manual 07 · Two axes, one gear"
        chapters={[
          {
            kicker: 'Chapter one',
            title: 'One scroll value, two directions.',
            body: 'The stage pins and your scroll becomes a gearbox: copy advances down the page while the marker strip below slides sideways at the exact same rate.',
          },
          {
            kicker: 'Chapter two',
            title: 'The strip is a ruler, not a carousel.',
            body: 'Each marker passes beneath a fixed cursor with tick marks calibrated to chapter length, you can read your position off it like a tape measure.',
          },
          {
            kicker: 'Chapter three',
            title: 'Counterpoint is the whole trick.',
            body: 'Vertical progress and horizontal drift stay locked at 1:1, printed live in the readout. Nothing eases independently; the axes cannot fall out of step.',
          },
          {
            kicker: 'Final chapter',
            title: 'Reverse the scroll, reverse the machine.',
            body: 'Every position is a pure function of scroll, scrub back and both axes retrace their path exactly. No timers, no snapping, no hijack.',
          },
        ]}
      />
      {/* scroll runway so the geared axes have room to play in context */}
      <div aria-hidden="true" className="h-[60vh]" />
    </div>
  )
}

API reference

DualAxisChapters accepts the following props.

PropTypeDefaultDescription
slatestringmono slate line above the stage, e.g. "FIELD MANUAL · TWO AXES"
chapters*DualAxisChapter[]2–6 chapters; one scroll value drives both axes
chapterVhnumber80scroll length per chapter in vh (default 80)

…plus everything from React.HTMLAttributes<HTMLElement>: className, event handlers, aria attributes and the rest pass straight through.

Referenced types

Typestsx
export interface DualAxisChapter {
  kicker?: string
  title: string
  body: string
}

Frequently asked questions

How do I install the Dual Axis Chapters component?

Register the @cleverui registry in your components.json ("@cleverui": "https://cleverops.com.au/r/{name}.json"), then run `npx shadcn@latest add @cleverui/dual-axis-chapters`. The shadcn CLI copies the source into your project, you own the code from that point. You can also copy the source directly from this page.

What dependencies does Dual Axis Chapters require?

Dual Axis Chapters has no npm dependencies beyond React and Tailwind CSS itself, so there is nothing extra to install or keep updated.

Can I theme Dual Axis Chapters to match my brand?

Yes. The component is styled entirely with Tailwind utilities over standard design tokens (primary, background, muted, border), so it inherits your existing shadcn/ui theme automatically. Change your CSS variables and the component follows, no source edits needed for palette, radius, or fonts.

Want this built for you?

CleverUI is built by the Clever Ops web team. If you'd rather ship a hand-coded, fast, custom website than assemble one, we build them for Australian businesses every week.

Explore web development services