Skip to content

Skeleton

Install this component.

Installation

npx shadcn@latest add https://ui.sntlr.app/r/skeleton.json

Source

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

/** A pulsing placeholder used to indicate loading content. */
function Skeleton({
  /** Additional CSS classes to apply to the skeleton. */
  className,
  ...props
}: React.ComponentProps<"div">) {
  return (
    <div
      data-slot="skeleton"
      className={cn("animate-pulse rounded-md bg-accent", className)}
      {...props}
    />
  )
}

export { Skeleton }