Skip to content

KSkeleton

示例

Variants

Placeholder skeleton element for loading states, with text, circle, and rectangle variants.

Props

NameTypeDefaultDescription
variant'text' | 'circle' | 'rectangle''rectangle'Shape variant of the skeleton.
widthstringExplicit width (e.g. '100px', '50%').
heightstringExplicit height.
animatedbooleantrueWhether to show the pulse animation.
classstringAdditional CSS classes.

Basic Usage

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

<template>
  <KSkeleton variant="text" width="200px" height="16px" />
  <KSkeleton variant="circle" width="48px" height="48px" />
  <KSkeleton variant="rectangle" width="100%" height="120px" />
</template>