Copy Button
Copies a value to the clipboard and confirms success or failure on screen and to screen readers.
Paste this into your agent.
Put Copy Button next to values people paste elsewhere, like invite links, API IDs, addresses and short tokens. It can be a bare icon after the value, a labelled text button, or an icon action inside an input group.
Install
bashnpx shadcn@4.18.0 add @siteplane/copy-button
Import it from @/siteplane/components/copy-button. The project needs Siteplane UI's one-time setup first: .
When to pick it
- vs : Pick Button when the action does something besides copying. Copy Button owns the copied and failed states.
- vs : Pair with Input Group when the value sits in a read-only field and the copy icon belongs at its end.
- vs : For a code block, pick Code with
copyable. It places this button inside the block for you.
Rules
- Name the icon-only form after what it copies, through
labels.copyoraria-label. Example: "Copy invite link". - Show the value next to the button so people can select it by hand if the clipboard write fails.
- Pass a function to
valueto fetch the text on press. Keep that request short: browsers allow a copy only for a brief window after the gesture. - In
onCopyError, tell people what to do next when copying is unavailable, such as on plain http. - In a field, set
profile="field-action". In a menu, keep aMenuItemand calluseCopyToClipboardfrom its handler.
Reference
Add to your agent
Print this skill from the terminal, or connect the whole catalog over MCP. Setup guides
CLI
MCP server
Questions
Related skills
Accessible Focus Statesby UI Skillbook
Keep a visible, high-contrast focus indicator on every interactive element, without a generic browser outline or none at all.
Accessibility
Better Accessibilityby jakubkrehel
Review and improve focus states, keyboard support, ARIA, forms, screen readers, hit areas, and motion accessibility.
AccessibilityExternalGitHub stars: 9.2K
Build Primitiveby PrototyperAI
Build foundational UI primitives from scratch with strong ARIA, keyboard, focus, and state handling.
AccessibilityExternalGitHub stars: 7
Link Purposeby AccessLint
Compatibility listing for link-purpose installs from AccessLint's marketplace skill set.
AccessibilityExternalGitHub stars: 114