Component packs › Pressworks › 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.
| Prop | Type | Default | Description |
|---|---|---|---|
form | string | Title printed on the top page. | |
ariaLabel | string | Accessible name. | |
pendingText | string | Status while a returned promise is pending. | |
doneText | string | Status when done. | |
disabled | boolean | ||
onSubmit | () => void | Promise<unknown> | Runs when the staple goes in. Return a promise to hold the status until it settles. | |
theme | 'light' | 'dark' | ||
size | number | Scale factor. 1 = 300 × 178 px. | |
autoplay | number | false | Showcase mode: staples a fresh form every N ms while visible. |
readonly stapled: booleansubmit(): voidreset(): void: Feeds a fresh stack in.setDisabled(disabled: boolean): voiddestroy(): voidimport StaplerSubmit from './StaplerSubmit';
<StaplerSubmit />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Buttons.