# Stamp (stamp)

> Vermilion rubber-stamp impression that drops, makes contact, and inks in as a 0–1 press progresses.

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

## Install

```sh
npx shadcn@latest add @jbm/stamp
```

Also installs @jbm/tokens, @jbm/scene-geometry (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/stamp.json, files[].content).

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

## API

### `Stamp` (component)

Bordered mono text in vermilion with a faint offset second impression. An ink impression, not a validation verdict. `press` is controlled with no timer: the stamp descends from 60px above until contact at 0.62, and its ink fades in from 0.5 to fully opaque at 0.8.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `text` | `string` | required | Impression text in 24px bold mono; wraps anywhere when space runs out. |
| `press` | `number` | `1` | Press progress 0–1 (clamped). Invisible below 0.5, touches down at 0.62, fully inked from 0.8. |
| `angle` | `number` | `-7` | Rotation of the impression in degrees; negative tilts counter-clockwise. |
| `style` | `CSSProperties` | none | Inline styles merged last onto the outer element. Setting transform or opacity here replaces the press animation. |

## Stage

fluid: Inline-block sized by the text: one 24px mono line plus 8px/16px padding and a 3px border, up to 100% of the container. Before contact it sits up to 60px higher, and rotation widens the footprint, so reserve headroom (the gallery pads 70px above).

## Examples

### Nearly settled stamp

```tsx
import { Stamp } from "@/jbm/ui/stamp"

<Stamp text="REVISADO" press={0.9} angle={-7} />
```

## QA

- Drag Press through 0, 0.5, 0.62, 0.8, and 1: hidden, faint while descending, touching down, fully inked, and settled with no jump.
- Drag Stamp angle to both extremes: the rotated box stays inside the preview on narrow screens.
- Check the offset second impression reads as ink texture, not a duplicate label, and screen readers hear the text once.

## 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)
- [SceneGeometry (scene-geometry)](https://jbm-ui.bns.studio/catalog/scene-geometry.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
