Skip to content

shadcn.io is an independent project built on shadcn/ui

Free

Table with Avatars Skeleton for Svelte

A four-column people table as loading bars, with a round avatar and a name in the first cell.

UI library: Ark UI

Each row starts with a small round avatar and a name bar, then three more cells. The rows are a four-column grid.

Use it for a user or customer table while the people load. If the query returned nobody, show Empty instead of blank rows. In Svelte, Ark UI does not look up the accounts.

Preview

Preview width

Installation

MCP · Pro
Make your AI a shadcn expert
Your agent installs components, builds pages and restyles your app from one prompt, in Claude Code, Cursor or VS Code.
Part of Pro

Anatomy

Skeleton anatomy: avatar, title, description, media

Usage

<div class="flex w-full max-w-2xl flex-col gap-3"><div class="grid grid-cols-4 gap-4 border-b pb-3"><Skeleton class="h-4 w-20" /><Skeleton class="h-4 w-16" /><Skeleton class="h-4 w-20" /><Skeleton class="h-4 w-16" /></div>{#each ROWS as row (row)}<div class="grid grid-cols-4 items-center gap-4"><div class="flex items-center gap-3"><Skeleton class="size-8 shrink-0 rounded-full" /><Skeleton class="h-4 flex-1" /></div><Skeleton class="h-4 w-full" /><Skeleton class="h-4 w-full" /><Skeleton class="h-4 w-full" /></div>{/each}</div>

FAQ

How is the table grid set up?

max-w-2xl with gap-3. The header and each row are grid grid-cols-4 gap-4. The header adds border-b pb-3. Rows add items-center.

What are the header bars?

Four h-4 bars: w-20, w-16, w-20 and w-16.

What is in the first cell?

flex items-center gap-3: a size-8 shrink-0 rounded-full circle and an h-4 flex-1 bar. size-8 is the default Avatar size. The other three cells are h-4 w-full.

How many body rows are there?

Four, from ROWS. Each row repeats the circle and the three full-width bars.

Why is the circle shrink-0?

shrink-0 keeps the size-8 circle from squeezing when the name bar is flex-1. rounded-full replaces the style's default radius.

Should these avatar rows be hidden?

Set aria-hidden on each Skeleton when nearby text already says the table is loading. The circles are decorative.

API Reference

Skeleton

No extra props in this demo. The rest is on the Skeleton page.