UI / Decor
Passport Stamp
A rubber passport stamp in SVG with worn ink, nine border shapes and nine inks. The city, country and date fit themselves to the shape.
Installation
npx shadcn@latest add https://jiaweing.com/r/passport-stamp.jsonWith the @jiaweing namespace set up, use @jiaweing/passport-stamp in place of the URL.
Usage
tsx
import { PassportStamp } from "@/components/passport-stamp";tsx
<PassportStamp
city="Tokyo"
className="w-40"
country="Japan"
date="2026"
ink="red"
shape="circle-dots"
tilt={-8}
/>Props
PassportStamp
| Prop | Type | Default | Description |
|---|---|---|---|
| city | string | - | The big line. Long two word names wrap onto two lines. |
| country | string | - | The small line. |
| date | string | - | A year or a fuller date, printed as given. |
| shape | "circle" | "circle-dots" | "oval" | "rect" | "rect-band" | "ticket" | "triangle" | "hexagon" | "octagon" | "circle" | The border and layout. |
| ink | "red" | "blue" | "green" | "violet" | "teal" | "magenta" | "orange" | "black" | "indigo" | "red" | Ink colour, with its own light and dark values. |
| tilt | number | 0 | Rotation in degrees, clockwise. |
| grain | number | - | Seed for the worn ink texture. Picked from the city by default. |
| className | string | - | Classes on the wrapper. Set the width here. |
MIT licensed. Copy it, change it, ship it.