# PaperClip (paper-clip)

> Independent ink wire clip to lay across a paper edge.

- Entry: component
- Category: UI Bits
- Preview capabilities: none (still preview)
- Runtime: React
- Needs Remotion: no
- QA page: https://jbm-ui.bns.studio/c/paper-clip
- JSON: https://jbm-ui.bns.studio/catalog/paper-clip.json
- Registry item: https://jbm-ui.bns.studio/r/paper-clip.json (source code in files[].content)

## Install

```sh
npx shadcn@latest add @jbm/paper-clip
```

Also installs @jbm/tokens (registry dependencies install automatically).

## Required setup

1. Add the `@jbm` registry to components.json (keep any entries already there):

   ```json
   {
     "registries": {
       "@jbm": "https://jbm-ui.bns.studio/r/{name}.json"
     }
   }
   ```

2. Map `@/*` to `./src/*` in tsconfig.json `compilerOptions.paths`, so `@/jbm/…` imports resolve to src/jbm/.

## Files

Each file's source code is in the registry item JSON (https://jbm-ui.bns.studio/r/paper-clip.json, files[].content).

| Source path | Installs to | Import |
| --- | --- | --- |
| `registry/jbm/ui/paper-clip.tsx` | `src/jbm/ui/paper-clip.tsx` | `@/jbm/ui/paper-clip` |

## API

### `PaperClip` (component)

Decorative (aria-hidden) wire clip: one 3px round-capped ink stroke in a 34×62 viewBox. It does not own the paper; position it over an edge yourself. All SVG attributes pass through to the root <svg>, so width, height, and style (e.g. absolute positioning) are set by the caller.

Also accepts SVGProps<SVGSVGElement>.

## Stage

Declared in stage pixels at the documented defaults.

| Orientation | Width | Height |
| --- | --- | --- |
| Landscape (1920×1080) | 26 | 48 |
| Vertical (1080×1920) | 26 | 48 |

Default width 26 and height 48 attributes on a 34×62 viewBox. Override width and height together to scale (the gallery shows 50×92); the viewBox keeps the drawing's proportions.

## Examples

### Clip across a card edge

```tsx
import { PaperClip } from "@/jbm/ui/paper-clip"

<div style={{ position: "relative", width: 220, height: 120, background: "white" }}>
  <PaperClip style={{ position: "absolute", left: 18, top: -24 }} />
</div>
```

## QA

- Inspect the loop at default and enlarged sizes: the single stroke has round caps and even width.
- Place it over a paper edge and check the part above the edge reads as clipped on, not floating.
- Confirm it stays aria-hidden and adds no focusable element.

## Family

Tape, clips & marks

## Docs

- [Paper and filing illustrations guide](https://jbm-ui.bns.studio/docs/design-video-components.md)

## Related

Installs:

- [Tokens (tokens)](https://jbm-ui.bns.studio/catalog/tokens.md)

Installed by:

- [ClippedNote (clipped-note)](https://jbm-ui.bns.studio/catalog/clipped-note.md)

## More

- [llms.txt](https://jbm-ui.bns.studio/llms.txt): index of every item
- [catalog.json](https://jbm-ui.bns.studio/catalog.json): every item as JSON
- [Agent contract](https://jbm-ui.bns.studio/docs/agent-contract.md): what each field means
