Agents (llms.txt)

Skeleton

A component to display a replacement for content while loading.

import { Skeleton } from '@/components/skeleton';

export default function SkeletonExample() {
  return (
    <div className="flex items-center gap-1">
      <Skeleton className="size-10 rounded-full" />
      <div className="flex flex-col gap-1">
        <Skeleton className="h-4 w-24" />
        <Skeleton className="h-4 w-32" />
      </div>
    </div>
  );
}

Source Code

import { cn } from '@/lib/utils/classnames';

interface SkeletonProps extends React.ComponentPropsWithRef<'div'> {}

const Skeleton = ({ className, ...props }: SkeletonProps) => {
  return (
    <div
      className={cn('animate-pulse rounded-md bg-foreground/10', className)}
      {...props}
    />
  );
};

export type { SkeletonProps };
export { Skeleton };

Server component. No 'use client' — static loading placeholder; forwards props only.

API Reference

Extends the div element.

Previous

Sidebar

Next

Slider