コンテンツにスキップ
Vantage
English
Esc
navigateopen⌘Jpreview

Skeleton

A box shaped like the content that will replace it.

A placeholder shaped like whatever is coming. Unlike Loading’s full-panel spinner, it keeps the layout intact while you wait.

export const client = "only";

import { Skeleton } from "@squadbase/vantage/ui";

export default function Example() {
  return (
    <div className="w-80 space-y-3 rounded-xl border p-4">
      <Skeleton className="h-5 w-32" />
      <Skeleton className="h-9 w-40" />
      <div className="space-y-2 pt-2">
        <Skeleton className="h-4 w-full" />
        <Skeleton className="h-4 w-3/4" />
      </div>
    </div>
  );
}
import { Skeleton } from "@squadbase/vantage/ui";

Size it with className (h-4 w-32 and friends). Match the height of the real element and the page won’t jump when the data lands.

For dashboard tiles, DashboardCardSkeleton is already the right shape.

このページは役に立ちましたか?