Annotation Pins
Two surfaces over one set of comments. A pin answers “what is wrong with this, here”; the panel answers “what is still open anywhere in this document”. They are not alternatives, and they stay in step.
The decision inside it
Threads measure the room they have
A thread opened near the bottom of a short page used to be clipped. It now measures the space above and below and opens on the side that fits.
Installation
How you get it
One command. The CLI writes the file into components/ui/ and installs what it needs.
npx shadcn@latest add https://layropro.com/r/annotation-pinsPro components need the CLI token from your account page. Put it in your environment as LAYRO_KEY and use the namespaced form.
API
“Copy prompt” above puts a full brief on your clipboard — install command, dependencies, props, and the mistakes an assistant usually makes with this component.
Props
Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.
| Prop | Type | Notes |
|---|---|---|
pins | AnnotationPin[] | — |
pagerequired | number | — |
sizerequired | { width: number; height: number } | — |
me | AnnotationAuthor | — |
placing | boolean | — |
onPlacingChange | (placing: boolean) => void | — |
onCreate | (pin: { page: number; x: number; y: number; body: string }) => void | — |
onReply | (pin: AnnotationPin, body: string) => void | — |
onResolve | (pin: AnnotationPin, resolved: boolean) => void | — |
onDelete | (pin: AnnotationPin) => void | — |
showResolved | boolean | — |
openId | string | null | — |
onOpenChange | (id: string | null) => void | — |
clusterBelow | number | Below this page width, nearby pins merge into one marker. Pins do not get smaller as the page does, so at 50% zoom a dozen of them become confetti. |
Dependencies
npm packages
clsxframer-motionlucide-reacttailwind-mergeLayro foundations, installed alongside it
layro-themeavatartooltipLifetime access
Every component, and everything we ship next.
- All 65 components, source included
- The template, and everything released after you buy
- shadcn CLI or download — React 18/19, Tailwind v4
- One payment. No subscription.
More in Documents
Document Viewer
PaidPages, zoom, thumbnails and a comment mode. You supply the renderer.
Included with lifetime access
Signer Flow
PaidWho it is waiting on, how long, and what you can do about it.
Included with lifetime access
Document Request
PaidA checklist that counts approved, never uploaded.
Included with lifetime access