tahamajs/IE / Projects /front /src /components /ui /skeleton.tsx
tahamajs's picture
download
raw
857 Bytes
import { cn } from "@/lib/utils";
interface SkeletonProps {
className?: string;
variant?: "text" | "circular" | "rectangular";
animation?: "pulse" | "wave" | "none";
}
export function Skeleton({
className,
variant = "rectangular",
animation = "pulse",
}: SkeletonProps) {
return (
<div
className={cn(
"bg-gray-200 dark:bg-gray-700",
animation === "pulse" && "animate-pulse",
animation === "wave" &&
"relative overflow-hidden before:absolute before:inset-0 before:-translate-x-full before:bg-linear-to-r before:from-transparent before:via-white/20 before:to-transparent before:animate-[shimmer_1.5s_infinite]",
variant === "circular" && "rounded-full",
variant === "text" && "rounded-md",
variant === "rectangular" && "rounded-lg",
className,
)}
/>
);
}

Xet Storage Details

Size:
857 Bytes
·
Xet hash:
1e20f61747cb3e021b5dcdbf84f42247fda9f554bf3f7369ed66c8abb68551f0

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.