ns-ui

Copy Button Travel

Copy-to-clipboard button whose confirmation shows what got copied: a duplicate of the source text visibly peels off the line and travels the real distance to the clipboard glyph before fading, arriving as the glyph gives a small catch-bounce and the label ticks to "Copied".

Use when copying API keys, code snippets, install commands or share links, where the confirmation should visibly carry the actual copied text so the user can eyeball that the right value left — pick rating-stamp instead for a rating/level input, unrelated to clipboard actions.

Install

npx shadcn add https://design.helpmarq.com/r/copy-button-travel.json
  • button
  • copy
  • clipboard
  • micro-interaction
  • form

ns-ui / copy-button-travel

API key

ns_demo_51Hb2c9k3f8G4mZ2qX7wA1p

Install command

npx shadcn@latest add copy-button-travel

Share link

https://ns-ui.dev/s/8f2c-9d41-lift

Click Copy — a translucent duplicate of the text peels up and drifts toward the clipboard glyph, which gives a small settle bounce as the label ticks to "Copied".

Props

PropTypeDefaultDescription
valuestringThe full string that gets copied to the clipboard. Also what is displayed.
description?stringShort description of what this copies, e.g. "API key" or "Invite link". Used to build the button's accessible name: "Copy {description}". Falls back to a truncated preview of `value` if omitted.
copyLabel?stringLabel shown at rest. @default "Copy"
copiedLabel?stringLabel shown for 2s after a successful copy. @default "Copied"
className?string