Component packs › Pressworks › Hole Punch

Hole Punch

The pin drives through the ticket, the chad tumbles into the clear tray where they pile up, and the ticket slides out with a hole you can see through.

Hole Punch is a confirm from Pressworks, a component pack with 8 buttons: Eight buttons, each a different real mechanism you can feel. Price: $2 for the whole pack.

Built with: lever on a hinge, falling chads that pile up, see-through hole.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Hole Punch props

PropTypeDefaultDescription
ticketstringPrinted on the ticket.
ariaLabelstringAccessible name.
doneTextstringStatus after a punch.
disabledboolean
onConfirm() => voidCalled when the pin has gone through.
theme'light' | 'dark'
sizenumberScale factor. 1 = 290 × 186 px.
autoplaynumber | falseShowcase mode: punches a fresh ticket every N ms while visible.

Methods on the ref

Use it in React

import HolePunch from './HolePunch';

<HolePunch />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Pressworks

Good for: Buttons.