Clipboard

Display a unique identifier element.

Usage

Wrap a component and provide the cliboard component with a source to add a tooltip & clipboard functionality. See CCIdentifier.

Optionally use the magic-key prop to add a clipboard shortcut for the value.

example-id
<script setup lang="ts">
const id = ref('example-id')
</script>

<template>
  <CClipboard
    :source="id"
    magic-key="Cmd_I"
  >
    <CIdentifier :id="id" />
  </CClipboard>
</template>

Props

source
string
magicKey
string