SPRINTSLab
← All components

Skeleton

A reusable skeleton loader that shows the shape of your content before the data arrives.

Install

terminal
npx shadcn@latest add https://sprintslab.xyz/r/skeleton.json

Or copy the component into your project:

skeleton.tsx
export function Skeleton({ className = "" }: { className?: string }) {
  return <div className={`animate-pulse rounded-md bg-zinc-800 ${className}`} />;
}

Usage

usage
import { Skeleton } from "@/components/skeleton";

<div className="flex items-center gap-4">
  <Skeleton className="h-12 w-12 rounded-full" />
  <div className="space-y-2">
    <Skeleton className="h-4 w-40" />
    <Skeleton className="h-4 w-64" />
  </div>
</div>

More components