Skeleton

Content loading placeholder wrapping daisyUI skeleton class. shape (rect / circle / text), width, height, radius, animated via props. width/height are Tailwind class names (w-32, h-4, etc.).

Default: a one-line text-width placeholder

<x-skeleton />
Loading…
Couldn't load the HTML

shape — rect (default) / circle / text

<x-skeleton width="w-full" height="h-16" />
<x-skeleton shape="circle" />
<x-skeleton shape="text" :lines="3" />
Loading…
Couldn't load the HTML

Real-world example: card placeholder

<div class="flex items-start gap-4">
    <x-skeleton shape="circle" width="w-14" height="h-14" />
    <div class="flex-1 space-y-2">
        <x-skeleton width="w-1/3" height="h-4" />
        <x-skeleton shape="text" :lines="3" />
    </div>
</div>
Loading…
Couldn't load the HTML

text lines — 1 / 2 / 3 / 5

<x-skeleton shape="text" :lines="1" />
<x-skeleton shape="text" :lines="2" />
<x-skeleton shape="text" :lines="3" />
<x-skeleton shape="text" :lines="5" />
Loading…
Couldn't load the HTML

Rounded corners — default / sm / md / lg / xl / full

<x-skeleton width="w-full" height="h-10" radius="default" />
<x-skeleton width="w-full" height="h-10" radius="sm" />
<x-skeleton width="w-full" height="h-10" radius="md" />
<x-skeleton width="w-full" height="h-10" radius="lg" />
<x-skeleton width="w-full" height="h-10" radius="xl" />
<x-skeleton width="w-full" height="h-10" radius="full" />
Loading…
Couldn't load the HTML

Size via Tailwind classes (raw px is not allowed)

<x-skeleton width="w-32" height="h-4" />
<x-skeleton width="w-1/2" height="h-8" />
<x-skeleton width="w-full" height="h-32" radius="lg" />
<x-skeleton width="w-24" height="h-24" radius="md" />
Loading…
Couldn't load the HTML

Static placeholder (no pulse) — animated=true (default) vs false

<div class="space-y-2">
    <x-skeleton width="w-2/3" height="h-4" />
    <x-skeleton width="w-full" height="h-4" />
    <x-skeleton width="w-1/2" height="h-4" />
</div>
<div class="space-y-2">
    <x-skeleton width="w-2/3" height="h-4" :animated="false" />
    <x-skeleton width="w-full" height="h-4" :animated="false" />
    <x-skeleton width="w-1/2" height="h-4" :animated="false" />
</div>
Loading…
Couldn't load the HTML