← Components/primitives

Copy

Copy + CopyButton — primitives.

primitivesstablea11y: untested2/3 coverageEdit on GitHub ↗
primitives-copy--defaultOpen all variants →

When to use

  • Reveal a small "Copy" affordance next to API keys, tokens, code snippets, share links.
  • Pair with `CodeSnippet` (which already includes Copy internally).

When not to use

  • A primary form button that happens to copy → use `Button` and call your own clipboard API.
  • Code blocks → use `CodeSnippet` directly; it includes Copy.