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.

Props ​

PropTypeDefaultDescription
textstringrequiredWhat lands on the clipboard
labelstring'Copy'Accessible name and tooltip. Default from the catalogue (copyButtonCopy)
copiedLabelstring'Copied'Accessible name and tooltip while it shows a tick. Default from the catalogue (copyButtonCopied)
sizeTButtonSize'xs'Button size
durationnumber1500How long the checkmark stays, in ms

Events ​

EventPayloadFired when
copiedtext: stringThe text is on the clipboard
errorerror: unknownThe browser refused, both ways