Skip to content
VenusUI
Get started

Postage Stamp

A perforated stamp with a photo that takes a postmark when you press it.

Preview

Installation

npx shadcn@latest add @venusui/postage-stamp

Run this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.

Files added to your project

Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.

  • @/components/ui/postage-stamp.tsx

Usage

The code behind the preview above.

postage-stamp-demo.tsx

import { PostageStamp } from "@/components/ui/postage-stamp"

// Photos: Unsplash (free under the Unsplash License).
const photo = (id: string) => `https://images.unsplash.com/photo-${id}?w=420&h=525&fit=crop&auto=format&q=75`

export default function PostageStampDemo() {
  return (
    <PostageStamp
      src={photo("1523906834658-6e24ef2386f9")}
      alt="The Rialto Bridge over the Grand Canal"
      title="Venice"
      country="Italy"
      value="€1.30"
      postmark={{ place: "Venezia", date: "27 JUN 26" }}
    />
  )
}

API reference

PropTypeDefaultDescription
src, altstring—The photo.
title, countrystring—Printed on the stamp.
valuestring—Face value.
postmark{ place: string; date: string }—Text in the postmark.
cancelledboolean—Controlled postmark state.
defaultCancelledbooleanfalseStart postmarked.
onCancelledChange(cancelled: boolean) => void—Called when pressed.

All <button> props; className sets the width.

Requirements

  • React 19 and Tailwind CSS v4. The CLI adds the keyframes.

Customization

  • Portrait photos at 4:5 fit best.

Accessibility

  • The stamp is a toggle button that says whether it is postmarked.

Troubleshooting

Something looks different from the preview.
Components use your project’s theme tokens, so surrounding colours and radius follow your styles.
Unknown registry "@venusui"
Your shadcn CLI couldn’t find the namespace in the shadcn registry index. Use the latest CLI (npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.
No components.json found
Run npx shadcn@latest init in your project first.
Loading preview

A card that tilts in 3D toward the pointer with spring physics.

Loading preview

A flight boarding pass with a perforated stub and code that flips to the fare and baggage details.

Loading preview

Stacked cards with the next ones peeking out; Next sends the top card to the back.