@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

Prop Type Default Description
variant "rect" | "circle" | "text" "rect" Shape of the placeholder. Text auto-sets height for single lines.
width number | string Width in px (number) or any CSS unit (string).
height number | string Height in px (number) or any CSS unit (string).
class string Additional CSS class.