Component packs › Pressworks › Stapler Submit

Stapler Submit

The arm comes down on its return spring, the stack squeezes, a staple drives through the corner and the form slides out while your submit runs.

Stapler Submit is a submit 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: return spring, staple through the stack, promise aware.

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.

Stapler Submit props

PropTypeDefaultDescription
formstringTitle printed on the top page.
ariaLabelstringAccessible name.
pendingTextstringStatus while a returned promise is pending.
doneTextstringStatus when done.
disabledboolean
onSubmit() => void | Promise<unknown>Runs when the staple goes in. Return a promise to hold the status until it settles.
theme'light' | 'dark'
sizenumberScale factor. 1 = 300 × 178 px.
autoplaynumber | falseShowcase mode: staples a fresh form every N ms while visible.

Methods on the ref

Use it in React

import StaplerSubmit from './StaplerSubmit';

<StaplerSubmit />

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

More in Pressworks

Good for: Buttons.