Skip to main content
Clever Ops

Sundial

Scroll runs the sun across a drafted sundial, the shadow wedge sweeps hour ticks, pinning content to times of day until the marked hour lights. React and Tailwind tokens, native scroll.

Preview & code

Loading Sundial preview

Installation

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

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

Usage

tsx
import { ScrollSundial } from '@/components/blocks/scroll-sundial'
Exampletsx
import { ScrollSundial } from '@/components/blocks/scroll-sundial'

export default function ScrollSundialDemo() {
  return (
    <ScrollSundial
      eyebrow="Observatory · Meridian Court"
      heading="Let the day pin the agenda."
      body="A plan-view sundial whose gnomon-shadow is the scrub. Three appointments lock as the wedge crosses their hour ticks, the final marked hour earns the primary keyline."
      readoutCaption="SOLAR"
      scrubLength={3}
      hours={[
        { time: '09:15', label: 'Site walkthrough' },
        { time: '12:40', label: 'Light study' },
        { time: '15:05', label: 'Stone set review' },
        { time: '16:50', label: 'Closing sightline' },
      ]}
    />
  )
}

API reference

ScrollSundial accepts the following props.

PropTypeDefaultDescription
eyebrowstring
heading*string
bodystringshort standfirst beside the dial
hours*SundialHour[]3–4 milestones in chronological order pinned to hour ticks; the last carries the accent
readoutCaptionstring'SOLAR'mono prefix on the time readout
scrubLengthnumber3section height as a multiple of the viewport

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

Referenced types

Typestsx
export interface SundialHour {
  time: string
  label: string
}

Frequently asked questions

How do I install the Sundial 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-sundial`. 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 Sundial require?

Sundial uses motion on top of React and Tailwind CSS. You don't need to install it manually, the shadcn CLI resolves and installs npm dependencies automatically when you add the component.

Can I theme Sundial 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