Component packs › Vouch › Success Morph
The button draws in to a round steel plate while your action runs, a latch inside snaps shut, then it opens out into “Request sent”.
Success Morph is a button from Vouch, a component pack with 6 validation components: Form validation where every rule is a latch that clicks shut. Price: $2 for the whole pack.
Built with: button to plate, sealing latch, error shake.
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 |
|---|---|---|---|
label | string | ||
doneLabel | string | ||
action | () => Promise<unknown> | waits 1.1 s | Your async action. Default: waits 1.1 s. Reject to show the error state. |
resetAfter | number | false | Back to the start after N ms; false to stay done. | |
onDone | () => void | ||
autoplay | number | false | Showcase mode: presses itself every N ms while visible. |
readonly state: 'idle' | 'busy' | 'done' | 'error'press(): voidreset(): voiddestroy(): voidimport SuccessMorph from './SuccessMorph';
<SuccessMorph />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Form validation.