Skip to content

KStatusBadge

示例

Variants

OnlinePendingFailedDraftInfo

A colored status indicator badge with an optional pulsing dot and label.

Props

NameTypeDefaultDescription
labelstringText displayed next to the status dot.
variant'success' | 'warning' | 'danger' | 'info' | 'neutral' | 'purple' | 'amber' | 'blue' | 'cyan' | 'green' | 'grey' | 'indigo' | 'light-blue' | 'light-green' | 'lime' | 'orange' | 'pink' | 'red' | 'teal' | 'violet' | 'yellow''neutral'Color variant for the badge.
pulsebooleanfalseWhether the dot should pulse animate.
showDotbooleantrueWhether to show the colored dot indicator.
copyablebooleanfalseWhether clicking the badge copies the label text.
autoColorstringA string used to auto-determine the color variant via hashing. Overrides variant when provided.
size'sm' | 'md' | 'lg''md'Badge size.

Emits

NameParametersDescription
This component does not emit custom events.

Slots

NameDescription
This component does not provide slots.

Basic Usage

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

<template>
  <KStatusBadge label="Active" variant="success" />
</template>