@usevyre/react@usevyre/vue

Skeleton

Animated loading placeholder. Use to match the shape of content before it loads — reduces perceived wait time and prevents layout shift.


Card placeholder

import { Skeleton } from "@usevyre/react";

// Avatar + text card placeholder
<div style={{ display: "flex", gap: 12, alignItems: "center" }}>
  <Skeleton variant="circle" width={40} height={40} />
  <div style={{ display: "flex", flexDirection: "column", gap: 6 }}>
    <Skeleton variant="text" width={180} />
    <Skeleton variant="text" width={120} />
  </div>
</div>

// Image placeholder
<Skeleton variant="rect" width="100%" height={120} />

Props

Props

PropTypeDefaultDescription
variant"rect" | "circle" | "text""rect"Shape of the placeholder. Text auto-sets height for single lines.
widthnumber | stringWidth in px (number) or any CSS unit (string).
heightnumber | stringHeight in px (number) or any CSS unit (string).
classstringAdditional CSS class.