Display

Skeleton

A placeholder preview of content before the data loads, reducing layout shift. Pure Tailwind, no dependencies.

Preview

Fullscreen

Source

Copy this file to components/ui/skeleton.tsx

tsx
'use client'

import { cn } from "@/lib/utils"

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

export { Skeleton }

Props

PropType
classNamestring