Component packs › Ditto › Paste Target

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.

Paste Target props

PropTypeDefaultDescription
labelstring"Delivery address"Field label. Default "Delivery address".
placeholderstring
valuestring
samplestringText the showcase pastes.
onChange(value: string) => void
darkboolean
autoplaynumber | falseShowcase mode: pastes the sample every N ms.

Methods on the ref

Use it in React

import PasteTarget from './PasteTarget';

<PasteTarget />

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

More in Ditto

Good for: Copy and share.