Component packs › Ditto › Paste Target
Paste and the text flies out of the clipboard, arcs over and lands in the field, which fills with it while the clipboard empties.
Paste Target is a paste from Ditto, a component pack with 6 copy and share controls: Copy and share where you see the copy happen: the text lifts off and drops into the clipboard. Price: $2 for the whole pack.
Built with: reverse flight, reads the real clipboard, keyboard paste animated too.
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 | "Delivery address" | Field label. Default "Delivery address". |
placeholder | string | ||
value | string | ||
sample | string | Text the showcase pastes. | |
onChange | (value: string) => void | ||
dark | boolean | ||
autoplay | number | false | Showcase mode: pastes the sample every N ms. |
readonly value: stringpaste(text: string): Promise<void>: Animate `text` in as if pasted.clear(): voiddestroy(): voidimport PasteTarget from './PasteTarget';
<PasteTarget />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Copy and share.