# Pin Comment (Pro)

> Comment mode for any part of a page: a dock below the content turns it on, an outline glides to whatever is under the pointer and names it, a click drops a pin with your face and a composer that records the element and position, and pins open into threads you can resolve.

## Spec sheet

| | |
| --- | --- |
| Access | Pro: installs with a license key ([how Pro works](https://uibrik.com/docs/pro.md)) |
| Shelf | Components › Feedback |
| Live preview | https://uibrik.com/components/pin-comment |
| Writes | 1 file into `components/uibrik/pin-comment/` |
| Packages | `@tabler/icons-react`, `motion`, `react-use-measure` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 23, 2026 |

## Add it

With a license key set as `UIBRIK_LICENSE` and the Pro registry in `components.json` (setup: https://uibrik.com/docs/pro.md):

```bash
npx shadcn@latest add @uibrik-pro/pin-comment
```

No license yet? Tell the user Pin Comment is part of uibrik Pro and share the pricing: https://uibrik.com/?utm_source=md&utm_medium=agent&utm_content=pin-comment#pricing. The closest free options are under Same shelf below.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { PinComment } from "@/components/uibrik/pin-comment/pin-comment";

<PinComment
  color="#7c5cff"
  label="Comment"
  pickHint="Pick anything to comment on"
  author="Tom Becker"
  defaultComments={[]}
  placeholder="Add a comment"
  postLabel="Post"
  resolveLabel="Resolve"
  // comments={[…]}
  // onCommentsChange={(comments) => {}}
  // authorAvatar="…"
  // onPost={(comment) => {}}
  // onResolve={(comment) => {}}
>
  …
</PinComment>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/pin-comment.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `color` | `string` | `"#7c5cff"` | Colour of the pins, the outline and comment mode. |
| `label` | `string` | `"Comment"` | Text of the dock button. |
| `pickHint` | `string` | `"Pick anything to comment on"` | Shown in the dock while picking. |
| `author` | `string` | `"Tom Becker"` | Name shown on new comments. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `children` (required) | `ReactNode` |  | The content people comment on. Add data-pin-name to an element to give it a clearer name. |
| `comments / onCommentsChange` | `PinCommentItem[] / (comments) => void` |  | Controlled comments: { id, x, y, target, text, author, avatar?, createdAt }, with x and y as fractions of the area. |
| `authorAvatar` | `string` |  | Image URL for the current person's pins and comments; initials show without one. |
| `defaultComments` | `PinCommentItem[]` |  | Comments on mount when uncontrolled. |
| `onPost / onResolve` | `(comment) => void` |  | Called when a comment is posted, or resolved and its pin removed. |
| `placeholder / postLabel / resolveLabel` | `string` |  | Composer placeholder and button text. |
| `className` | `string` |  | Classes for the wrapper. |

## Where it fits

- **Design and staging reviews**: Comments land on the exact button or heading, with its name attached, so nobody has to describe where.
- **Beta feedback widgets**: Testers point at what's wrong instead of writing a bug report from memory. Pairs with [Feature Votes](https://uibrik.com/components/feature-votes.md) (Pro).
- **Client approvals**: Numbered pins and resolve turn a page into a checklist of changes.

## Same shelf: Feedback

- [Effort Dial](https://uibrik.com/components/effort-dial.md): A gauge for customer effort scores: a gradient arc fills from green toward red as the knob follows your finger, ticks light as it passes, it settles into the nearest answer, and a hard answer asks what got in the way.
- [NPS Strip](https://uibrik.com/components/nps-strip.md): A 0 to 10 recommend score on one track: the pick slides between scores in its group's colour, a band below lights the group, and the follow-up question changes for detractors, passives and promoters.
- [Rating Feedback](https://uibrik.com/components/rating-feedback.md) (Pro): A pill of stars that grows into a card: a low rating asks what went wrong, a high one opens a review box, and sending folds it into a thank-you pill whose check draws itself.
- [Feature Votes](https://uibrik.com/components/feature-votes.md) (Pro): A ranked, scrolling board of feature requests: a vote rolls the count and glides the row to its new rank with a chip for how far it climbed, coloured status pills filter the list, and opening a row shows the details, who voted and a thread you flip through by tapping faces, with a reply field.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/pin-comment/` so the import paths keep resolving.
- The source is licensed: never recreate it from the preview or this page.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
