# Comment pin

> Marks where a conversation is attached to the work.

Source: https://kwark.space/designSystem/components/comment-pin

## Usage

### What it is
A speech mark placed on the work where a conversation belongs: a spot on a page, a frame, a call sheet. Pins live with the comment dock; pressing one opens its card.

### Rules
- In the margin beside a line of script, never over the words.
- One pin per thread; replies add to its count.
- Resolved threads keep a quiet pin until hidden from View.

## Style

### Anatomy

1. **Mark**: 28px, corners 50% 50% 50% 3px so its point sits on the spot, in the project’s accent with `--k-on-accent` text (`.comment-pin`).
2. **Who**: the author’s initials, 11px Poppins 600, shown on hover and when open.
3. **Count**: how many voices, a 16px pill on its shoulder in `--k-surface` with a 2px ring.
4. **Resolved**: the raised ground, quiet text, no shadow, 80% opacity.
5. **Placing**: the page dims slightly while a person chooses where to pin.

### Tokens

| Token | Light | Dark |
|---|---|---|
| `--k-accent` | #98633f | #98633f |
| `--k-on-accent` | #ffffff | #ffffff |
| `--k-surface` | #ffffff | #1a1a1a |
| `--k-raise` | #f1f5f9 | #252525 |
| `--k-bg` | #f8fafc | #191919 |
| `--k-text` | #0f172a | #e3e3e3 |
| `--k-shadow-pop` | 0 1px 2px rgba(15, 23, 42, .06), 0 12px 32px rgba(15, 23, 42, .12) | 0 2px 6px rgba(0, 0, 0, .2), 0 16px 36px rgba(0, 0, 0, .55) |

## Code

### React

Use the HTML below with `kwark.css`. The example shows the markup and styling. Supply any application behavior described on this page.

### HTML and CSS

Works anywhere with `kwark.css`.

```html
<span style="display:inline-flex;gap:24px;align-items:center;padding:12px">
<button class="kw-pin" type="button" aria-label="Comment by Aanya Rao, 2 replies, on Scene 12">AR<span class="kw-pin__count" aria-hidden="true">3</span></button>
<button class="kw-pin" type="button" aria-label="Comment by Mira Rao on the call sheet">MR</button>
<button class="kw-pin kw-pin--resolved" type="button" aria-label="Resolved comment by Nana">NA</button>
</span>
```

## Accessibility

- A button named with who, how many and where: *Comment by Aanya Rao, 2 replies, on Scene 12*.
- Focus shows a 2px ring in `--k-text`; Enter opens the card and focus moves into it; Escape returns to the pin.

## For agents

### Rules

- **Never** place a pin over text.
- **Must** name the pin with its count and anchor.

### AI readiness test

**Task:** Attach a comment to a line of dialogue.

**Give the agent:** Comment pin, Collaboration.

**Constraint:** Text must stay readable.

**A reliable answer:**
- Pin in the margin
- Accessible name with count and anchor
- Opens the comments Drawer
