Components

Stamp

A rubber stamp: solid ink pressed through a worn pad, double-rule border, typewriter capitals, a slight tilt and sometimes the ghost of a first impression. For APPROVED, PAID, DRAFT and friends.

Install

terminal
npx shadcn@latest add @wobko/stamp

First time here? Add the registry to components.json first. How to install

Examples

Presets

Ink pressed through a worn pad: about 86 percent of it survives, patches are missed, the border wobbles and the whole stamp tilts a few degrees.

Shapes and inks

A box, a ring with rim text, a twelve-point seal, and big diagonal letters. Pad inks are red, blue felt, green or ink, never a stationery accent.

On a document

Stamps go on top of real content and never block it: the svg ignores the pointer and keeps its own name for screen readers.

API reference

Stamp

An intrinsic ink svg in one color of pad ink, drawn through the baked `stamp` wear mask.

PropTypeDefaultDescription
namestring-A preset from the sticker sheet: `stamp-approved`, `stamp-draft`, `stamp-paid`, `stamp-urgent`, `stamp-received`, `stamp-void`, `stamp-new`, `stamp-member`. Other props override it.
textstring-The main word (capitals are set for you).
shape"rect" | "round" | "burst" | "void""rect"Double-rule box, double ring with rim text, twelve-point seal, or big diagonal letters struck through.
ink"red" | "ink-you" | "green" | "ink""red"Pad ink. Never a stationery accent.
substring-A smaller second line (a date, `issue`).
ringstring-Text around the rim of a round stamp.
w / h / sizenumber-Box in px; `size` is the diameter of round and burst stamps.
tiltnumber-Degrees; default a seeded -5 to 5.
ghostboolean-A faint first impression under the main one.
dashedboolean-Dashed inner rule instead of a solid one.
seedstring | number-Wear, wobble and the patches where the pad missed.
labelstring-Accessible name (default: the stamp's text).

Accessibility

  • The svg is an image named by its text (`role="img"`), so a stamped APPROVED is announced as "Approved".

Source

The files the CLI copies into your project.

Loading the source