Clipboard

Display a unique identifier element.

Usage

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

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"
    hide-icon
  >
    <CIdentifier :id="id" />
  </CClipboard>
</template>

    

Hide icon suffix

This will be removed soon.

      <template>
  <CClipboard hide-icon />
</template>

    

Icon

Props

Prop Default Type
source string
magicKey string
hideIconboolean