Skeleton (骨架屏)

内容加载占位:text / rect / circle 形状,loaded 切换为真实内容,脉冲动画尊重 reduced-motion。

基础用法

Basic.vue

形状

Shapes.vue

加载完成切换

Loaded.vue

属性

属性类型默认值说明
animation"none" | "pulse""pulse"Pulse animation (auto-disabled under prefers-reduced-motion); `none` to turn off.
classNamestring""
heightstring""CSS height. Defaults: text 1em, rect 1.25rem, circle 2.5rem.
loadedbooleanfalseWhen true, render the default slot (real content) instead of the placeholder.
roundedKunUIRoundedundefined
variant"text" | "circle" | "rect""rect"Shape preset: `rect` block, `text` line, or `circle` (avatar).
widthstring""CSS width. Defaults: rect/text 100%, circle = height.