Loading placeholder with a soft shimmer sweep.
npx @agents-npm-packages/vibeui add skeleton --dir ./src/components/uiImport
import { Skeleton } from "@/components/ui/skeleton"Generated from the component's TypeScript types, so it always matches the source. * marks a required prop.
also accepts every HTMLAttributes<HTMLDivElement> attribute
No props of its own: it forwards native attributes to the element.
import { cn } from "@/lib/utils";
/** Loading placeholder with a soft shimmer sweep. */
export function Skeleton({
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) {
return (
<div
aria-hidden
className={cn(
"animate-shimmer rounded-sm bg-surface-muted bg-[linear-gradient(100deg,transparent_30%,var(--surface-sunken)_50%,transparent_70%)] bg-[length:250%_100%]",
className,
)}
{...props}
/>
);
}
Exports Skeleton. Peer dependencies: clsx, tailwind-merge.