Skip to main content
Clever Ops

Scroll Director

A pinned narrative stage for React, scroll scrubs through choreographed beats on a sticky frame with a cue rail and running timecode, fully reversible and never scroll-jacked. Tailwind-themed.

Preview & code

Loading Scroll Director preview

Installation

pnpm dlx shadcn@latest add @cleverui/scroll-director

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

Usage

tsx
import { ScrollDirector } from '@/components/blocks/scroll-director'
Exampletsx
import { ScrollDirector } from '@/components/blocks/scroll-director'

export default function ScrollDirectorDemo() {
  return (
    <ScrollDirector
      slate="Production 04 · One take"
      beats={[
        {
          kicker: 'Beat one',
          title: 'The stage pins. The page keeps scrolling.',
          body: 'Position sticky holds the frame while your scroll becomes the timeline, nothing is hijacked, and the scrub reverses as honestly as it plays.',
          figure: 'rule',
        },
        {
          kicker: 'Beat two',
          title: 'Each beat holds, then hands over.',
          body: 'Beats enter over the first quarter of their slot, hold center stage, and exit clean. The cue rail tracks position like a fly-floor call sheet.',
          figure: 'pulse',
        },
        {
          kicker: 'Beat three',
          title: 'Figures are drawn, not shipped.',
          body: 'Every scene figure is structural, rules, grids, orbits built from tokens. No images to load, nothing that cannot re-theme.',
          figure: 'grid',
        },
        {
          kicker: 'Final beat',
          title: 'Cut on the last frame.',
          body: 'The director holds the closing beat instead of looping. Scroll back up to run the take again in reverse.',
          figure: 'orbit',
        },
      ]}
    />
  )
}

API reference

ScrollDirector accepts the following props.

PropTypeDefaultDescription
slatestringmono slate line above the stage, e.g. "PRODUCTION 04 · ONE TAKE"
beats*ScrollDirectorBeat[]2–6 beats; scroll plays them in order, fully reversible
beatVhnumber85scroll length per beat in vh (default 85)

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

Referenced types

Typestsx
export interface ScrollDirectorBeat {
  kicker?: string
  title: string
  body: string
  /** structural figure drawn per beat, no images */
  figure?: 'pulse' | 'grid' | 'orbit' | 'rule'
}

Frequently asked questions

How do I install the Scroll Director component?

Register the @cleverui registry in your components.json ("@cleverui": "https://cleverops.com.au/r/{name}.json"), then run `npx shadcn@latest add @cleverui/scroll-director`. 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 Scroll Director require?

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

Can I theme Scroll Director 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