# ClippedNote (clipped-note)

> Paper note with an optional paper clip, rotation, and paper, accent, or ink stock.

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

## Install

```sh
npx shadcn@latest add @jbm/clipped-note
```

Also installs @jbm/tokens, @jbm/paper, @jbm/paper-clip (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/clipped-note.json, files[].content).

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

## API

### `ClippedNote` (component)

Composes Paper (10px radius, 18px padding, 220px wide up to 100% of its container) and PaperClip. Children render in bold sans with ink matched to the stock and wrap anywhere.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` | `ReactNode` | required | Note content. |
| `clip` | `boolean` | `true` | Shows the paper clip across the top edge at left 18px, top −24px. The clip extends above the note's box. |
| `tone` | `PaperTone` | `"paper"` | Paper stock: `paper` (card with ink text), `accent` (vermilion), or `ink`; text switches to cream on accent and ink. |
| `rotate` | `number` | `0` | Rotation of the whole note, clip included, in degrees. |
| `style` | `CSSProperties` | none | Inline styles merged last onto the Paper, e.g. width, padding, or font size. |

## Stage

fluid: Width is 220px (maxWidth 100%) unless style overrides it; height follows the wrapped children plus 36px padding and a 4px border. The clip adds 24px above the top edge, and rotation enlarges the visual footprint.

## Examples

### Rotated clipped note

```tsx
import { ClippedNote } from "@/jbm/ui/clipped-note"

<ClippedNote clip rotate={-3}>Revisar el resultado.</ClippedNote>
```

### Small note attached to a paper tape

```tsx
import { ClippedNote } from "@/jbm/ui/clipped-note"
import { PaperTape } from "@/jbm/ui/paper-tape" // install @jbm/paper-tape separately

<PaperTape length={700} window={280} attachments={[{ id: "note", at: 650,
  content: <ClippedNote style={{ width: 108, fontSize: 12, padding: 10 }}>12 de 30 rutas</ClippedNote> }]} />
```

## QA

- Toggle Paper clip: the note does not shift, and the clip overlaps the top edge rather than floating above it.
- Toggle Accent paper and try ink: text stays legible on each stock.
- Drag Note rotation to both extremes: the clip rotates with the note and nothing is clipped by the preview.
- Check a long unbroken word wraps inside the 220px width on narrow screens.

## 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)
- [Paper (paper)](https://jbm-ui.bns.studio/catalog/paper.md)
- [PaperClip (paper-clip)](https://jbm-ui.bns.studio/catalog/paper-clip.md)

Imported in examples:

- [PaperTape (paper-tape)](https://jbm-ui.bns.studio/catalog/paper-tape.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
