KSkeleton
示例
Variants
Placeholder skeleton element for loading states, with text, circle, and rectangle variants.
Props
| Name | Type | Default | Description |
|---|---|---|---|
| variant | 'text' | 'circle' | 'rectangle' | 'rectangle' | Shape variant of the skeleton. |
| width | string | — | Explicit width (e.g. '100px', '50%'). |
| height | string | — | Explicit height. |
| animated | boolean | true | Whether to show the pulse animation. |
| class | string | — | Additional 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>