Skeleton

Redaction placeholder for loading states.

SwiftUI: .redacted(reason: .placeholder)

Installation

npx shadcn@latest add https://cupertino-ui.baltoon.jp/r/skeleton.json

Requires the theme tokens — see Installation if this is your first component.

Source

import * as React from "react";

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

/** Redaction placeholder — the .redacted(reason: .placeholder) look. */
function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
  return (
    <div
      data-slot="skeleton"
      className={cn(
        "animate-pulse rounded-[6px] bg-fill-tertiary",
        className
      )}
      {...props}
    />
  );
}

export { Skeleton };