vue
<template>
<span class="key">MA-123</span>
<NbCopyButton
:text="`https://acta.nubisco.io/s/MA?item=MA-123`"
label="Copy link to MA-123"
copied-label="Link copied"
/>
</template>It works inside a clickable parent
The click, pointerdown, mousedown and dblclick stop at the button. Placed on a card that opens on click or starts a drag on press, copying does neither.
Where the clipboard is refused
It uses the async clipboard API, and falls back to the selection copy where the page is not allowed it (plain http on a LAN address, a sandboxed frame). If both are refused it shows no checkmark and emits error, so the host can say so in a toast.