Skip to content

KChannelKeyDisplay

示例

Single Key

Key
sk-abc123def456ghi789jkl012mno345

Multiple Keys with warning

Key
key-one-aaaa\nkey-two-bbbb\nkey-three-cccc
Keep your keys secure and do not share them.

Displays one or more channel/API keys with individual and bulk copy actions, optional success icon, and a warning banner.

Props

NameTypeDefaultDescription
keyDatastring— (required)Key data as a string. Supports single keys, newline-separated keys, or a JSON array.
showSuccessIconbooleanfalseWhether to show a green checkmark icon above the keys.
successTextstring''Text displayed next to the success icon.
showWarningbooleanfalseWhether to show the warning banner.
warningTextstring''Text displayed inside the warning banner.
theme'auto' | 'day' | 'night''auto'Theme mode. auto follows the current theme; day and night force a specific mode.

Emits

NameParametersDescription
This component does not emit custom events.

Slots

NameDescription
This component does not provide slots.

Basic Usage

vue
<script setup>
import { KChannelKeyDisplay } from '@kK-2004/ui-component'
</script>

<template>
  <KChannelKeyDisplay
    key-data="sk-abc123def456ghi789"
    show-success-icon
    success-text="Key generated successfully"
    show-warning
    warning-text="Make sure to copy your key. It won't be shown again."
  />
</template>