Skeleton

Use to show a placeholder while content is loading.

Installation

Copy and paste the following code into your project.

import { cn } from "~/utils/tailwind";

function Skeleton({
  className,
  ...props
}: React.HTMLAttributes<HTMLDivElement>) {
  return (
    <div
      className={cn("animate-pulse rounded-1.5 bg-primary/10", className)}
      {...props}
    />
  );
}

export { Skeleton };

Update the import paths to match your project setup.

Usage

import { Skeleton } from "~/components/ui/Skeleton";
 <Skeleton className="h-4 w-64" />