Skip to main content
Clever Ops

Annotate Callouts

Inline annotation system, marked phrases carry numbered mono superscripts wired to margin notes that reveal as each mark scrolls into view. Editorial footnotes, live on the page.

Preview & code

Loading Annotate Callouts preview

Installation

pnpm dlx shadcn@latest add @cleverui/text-annotate-callouts

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

Usage

tsx
import { TextAnnotateCallouts } from '@/components/ui/text-annotate-callouts'
Exampletsx
import { TextAnnotateCallouts } from '@/components/ui/text-annotate-callouts'

export default function TextAnnotateCalloutsDemo() {
  return (
    <div className="mx-auto flex min-h-[520px] max-w-5xl flex-col justify-center px-4 py-16 sm:px-6 sm:py-24">
      <TextAnnotateCallouts
        notesLabel="Field notes"
        text="Meridian ships a drafting table for product teams, every surface is measured, every accent is earned. Review cycles close in hours, not weeks, because the proof lives next to the claim. The result is a library that reads like it was drawn, not decorated."
        annotations={[
          {
            phrase: 'drafting table',
            note: 'Structural layout primitives, rules, ticks, and mono labels, not glass cards.',
          },
          {
            phrase: 'accent is earned',
            note: 'One primary moment per viewport. Gold as spot color, never as decoration.',
          },
          {
            phrase: 'proof lives next to the claim',
            note: 'Margin apparatus mirrors editorial footnotes: numbered, wired, scroll-timed.',
          },
        ]}
      />
    </div>
  )
}

API reference

TextAnnotateCallouts accepts the following props.

PropTypeDefaultDescription
text*stringthe passage, keep to 2-4 sentences
annotations*TextAnnotateCalloutsAnnotation[]1-4 entries; each phrase must be an exact substring of text, notes ≤ 90 chars
notesLabelstring'Notes'mono micro-label heading the margin column
delaynumber0seconds before the first mark sequence starts

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

Referenced types

Typestsx
export interface TextAnnotateCalloutsAnnotation {
  phrase: string
  note: string
}

Frequently asked questions

How do I install the Annotate Callouts component?

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

Annotate Callouts 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 Annotate Callouts 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