Component guideEditable source

Skeleton

A placeholder showing the shape of content that is loading.

Original component docs
On this page4 sectionsBack to top

Use Skeleton while content is pending, not when a request failed or returned no results. Match final-content dimensions to reduce layout movement. Skeleton does not fetch data or decide when to disappear.

Live preview
Loading preview...

#Installation

Complete the base setup. For manual installation:

npx shadcn@latest add https://neobrutal-ui.andongmin.com/r/skeleton.json

#Usage

import { Skeleton } from "@/components/ui/skeleton";

export default function LoadingProfile() {
  return (
    <section aria-busy="true" aria-label="Profile">
      <p role="status" className="sr-only">
        Loading profile.
      </p>
      <div aria-hidden="true" className="flex items-center gap-4">
        <Skeleton className="size-12 rounded-full" />
        <div className="grid gap-2">
          <Skeleton className="h-4 w-40" />
          <Skeleton className="h-4 w-28" />
        </div>
      </div>
    </section>
  );
}

#API reference

PropPurposeDefault
classNameWidth, height, and shapeCaller-defined
Native div propsHTML attributes on placeholderForwarded
aria-hiddenHide decorative shapesSet explicitly in example

#Accessibility

Hide repeated shapes and expose one concise loading status for the section. Keep real context visible. Replace loading with content, an empty state, or an error message when the request finishes; an infinite placeholder is not error handling.