Loading placeholders for text, avatars, cards and rows. The shimmer stops for people who prefer reduced motion.
import { Skeleton, SkeletonText } from "kivu-ui"On this page
import { Skeleton, SkeletonText } from "kivu-ui";import { Skeleton, SkeletonText } from "kivu-ui";
export default function Demo() {
return (
<div className="flex w-full max-w-sm items-start gap-4">
<Skeleton shape="circle" width={48} height={48} />
<div className="flex-1">
<Skeleton width="40%" height="1rem" className="mb-3" />
<SkeletonText lines={3} />
</div>
</div>
);
}Extends <span> attributes.
| Prop | Type | Default | Description |
|---|---|---|---|
width | CSS length | - | Width. |
height | CSS length | - | Height. |
shape | "rect" | "circle" | "text" | "rect" | circle for avatars; text matches a line of body text. |
| Prop | Type | Default | Description |
|---|---|---|---|
lines | number | 3 | Number of lines. The last one is shorter. |
Every component also accepts className and forwards its ref. Root CSS class: .kivu-skeleton