InstallComponentsExample

Skeleton

Shimmering placeholders shown while content loads.

How it helpsSet the width and height and you have a placeholder that holds the layout steady until data arrives.

Loading card

export default function Example() {
  return (
    <>
      <div className="card w-full" style={{ maxWidth: "380px" }} aria-busy="true">
        <div className="flex flex-wrap items-center gap-3">
          <div className="skeleton" style={{ width: "40px", height: "40px", borderRadius: "50%" }}></div>
          <div className="flex flex-col gap-[6px] grow">
            <div className="skeleton" style={{ width: "60%" }}></div>
            <div className="skeleton" style={{ width: "40%" }}></div>
          </div>
        </div>
        <div className="skeleton mt-4" style={{ height: "80px" }}></div>
      </div>
    </>
  );
}
<div class="card w-full" style="max-width:380px" aria-busy="true">
  <div class="flex flex-wrap items-center gap-3">
    <div class="skeleton" style="width:40px;height:40px;border-radius:50%"></div>
    <div class="flex flex-col gap-[6px] grow">
      <div class="skeleton" style="width:60%"></div>
      <div class="skeleton" style="width:40%"></div>
    </div>
  </div>
  <div class="skeleton mt-4" style="height:80px"></div>
</div>

API

NameTypeDescription
.skeletonclassPlaceholder; size it with width and height.