Place comments on image coordinates, inspect numbered anchors, and resolve or reopen annotations from an accessible list.

pnpm dlx shadcn@latest add @latheui/anchored-annotationsPart of Lathe Pro. Set up your project once with your license key: npx latheui init --key <key>. See Lathe Pro.
Anchored Annotations is part of Lathe Pro
The preview is live and free to try. The source, the install and every assembly come with Pro: $79 once, with lifetime updates.
Depends on
| Prop | Type | Default | Description |
|---|---|---|---|
| image* (required) | { src: string; alt: string } | — | Image to annotate. Coordinates are percentages of its displayed area. |
| value / defaultValue | Annotation[] | [] (defaultValue) | Controlled or initial items with unique id, x, y, text and optional resolved flag. |
| onValueChange | (items: Annotation[]) => void | — | Receives additions and resolve/reopen changes. |
| disabled | boolean | false | Disable new comments, coordinate changes and resolution. Existing comments remain readable. |
| className | string | — | Classes for the section. |
Use the typed props to connect application state. The source is installed into your project.
"use client"
import { AnchoredAnnotations } from "@/components/ui/anchored-annotations"
export default function AnnotationDemo() {
return <AnchoredAnnotations image={{ src: "/demo/photos/david-edelstein-n4dbvtudikw.webp", alt: "A pagoda with Mount Fuji behind the city" }} defaultValue={[{ id: "note-1", x: 32, y: 42, text: "Give the foreground a little more room." }, { id: "note-2", x: 72, y: 28, text: "The horizon feels right here.", resolved: true }]} />
}