AddThisFeature

Copy to Clipboard

Make copying an exact value one click, with feedback the user can trust.

simple User Experience

What it adds

A copy control on every value people currently select by hand — IDs, API keys, share links, snippets.

What your agent is told to do

5
  1. 1

    Find every value a user would plausibly copy: record IDs, tokens, invite links, code blocks, error references.

  2. 2

    Copy the exact value. Strip the surrounding whitespace and any zero-width or formatting characters the UI added for display.

  3. 3

    Confirm the copy in place, next to the control, and revert to the idle state after a couple of seconds.

  4. 4

    Do not copy a masked or truncated value. If the UI shows dots or an ellipsis, either copy the full underlying value or require the user to reveal it first.

  5. 5

    Do not move focus on copy. The user is usually mid-flow and about to paste somewhere else.

Edge cases it handles

6
  • The Clipboard API fails on insecure origins and when permission is denied. Fall back to a selectable field and tell the user to copy manually.
  • Code snippets keep their line breaks and indentation; IDs and URLs must not carry a trailing newline.
  • A secret shown masked must never end up on the clipboard by accident.
  • Confirmation must be announced to screen readers, not conveyed by a colour change alone.
  • Copying twice in quick succession must not stack two confirmations on top of each other.
  • On mobile the confirmation must not appear under the user's thumb.

Definition of done

7
  • Every copyable value in the app has a copy control.
  • The copied value matches the real value exactly, with no stray whitespace.
  • Masked secrets cannot be copied without being revealed.
  • A blocked or unavailable Clipboard API degrades to a manual fallback rather than failing silently.
  • Success is announced accessibly and focus does not move.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.