Skip to content

Copy Button

Last updated 11 Nov 2026

NbCopyButton is a small icon button that puts a piece of text on the clipboard and turns into a checkmark for a moment to say it worked. Use it beside the thing being copied: a card key whose link people paste into a chat, an API token, an id.

Accessibility ​

  • It is a real button named by label, which becomes copiedLabel while the checkmark shows. Name what is copied ("Copy link to MA-123"), not just "Copy".
  • A polite status region says copiedLabel once, so a screen reader hears that the copy happened without having to see the icon change.
  • The tooltip is NbButton's own, drawn from the same label, so the name and the tooltip cannot disagree and no directive has to be installed.
  • The defaults, "Copy" and "Copied", come from the string catalogue (copyButtonCopy, copyButtonCopied), so provideNbStrings() translates them. A label or copiedLabel you pass wins over the catalogue.