Installation
copied = false, 2000)
"
:aria-label="copied ? 'Copied' : 'Copy code'"
class="absolute right-3 top-3 z-10 inline-flex size-7 items-center justify-center rounded-md border border-border bg-background text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
>
uvx django_shadcn@latest add skeleton
Usage
copied = false, 2000)
"
:aria-label="copied ? 'Copied' : 'Copy code'"
class="absolute right-3 top-3 z-10 inline-flex size-7 items-center justify-center rounded-md border border-border bg-background text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
>
<c-skeleton class="h-4 w-[250px]" />
The component ships no dimensions of its own. Give it the size and shape of
whatever it stands in for.
It fills with bg-accent, which is the same value as bg-muted in the
default palette. The demos below sit on the page background so the shapes
stay visible.
Examples
Card
copied = false, 2000)
"
:aria-label="copied ? 'Copied' : 'Copy code'"
class="absolute right-3 top-3 z-10 inline-flex size-7 items-center justify-center rounded-md border border-border bg-background text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
>
<div class="flex flex-col gap-3">
<c-skeleton class="h-[125px] w-[250px] rounded-xl" />
<div class="space-y-2">
<c-skeleton class="h-4 w-[250px]" />
<c-skeleton class="h-4 w-[200px]" />
</div>
</div>
Avatar and text
copied = false, 2000)
"
:aria-label="copied ? 'Copied' : 'Copy code'"
class="absolute right-3 top-3 z-10 inline-flex size-7 items-center justify-center rounded-md border border-border bg-background text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
>
<div class="flex items-center gap-4">
<c-skeleton class="size-12 rounded-full" />
<div class="space-y-2">
<c-skeleton class="h-4 w-[250px]" />
<c-skeleton class="h-4 w-[200px]" />
</div>
</div>
Standing in for a card
copied = false, 2000)
"
:aria-label="copied ? 'Copied' : 'Copy code'"
class="absolute right-3 top-3 z-10 inline-flex size-7 items-center justify-center rounded-md border border-border bg-background text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
>
<c-card>
<c-card.header>
<c-skeleton class="h-5 w-[160px]" />
<c-skeleton class="h-4 w-[220px]" />
</c-card.header>
<c-card.content class="space-y-2">
<c-skeleton class="h-4 w-full" />
<c-skeleton class="h-4 w-[80%]" />
</c-card.content>
</c-card>