Clipboard

Clipboard can be bound to an element to copy texts.

# Clipboard

Click the button below and then paste in somewhere else.

html
<script>
  const text = "Text to be copied."
</script>

<button class="btn btn-primary" use:clipboard={text}>Copy</button>