Skip to content

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

Free

Simple Table Rows Skeleton for Ark UI

A four-column table of loading bars, with a header row and five rows of cells beneath them.

A header row with a line under it, then five rows of four cells. The cells are bars in a grid, not the table component.

Use it while rows load, with the same column count as the finished table. When the rows exist, render them in a Table. In React, Ark UI does not sort or fetch them.

Preview

Preview width

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.
Use email insteadNo credit card

Anatomy

Skeleton anatomy: avatar, title, description, media

Usage

<div className="flex w-full max-w-2xl flex-col gap-3">
  <div className="grid grid-cols-4 gap-4 border-b pb-3">
    <Skeleton className="h-4 w-20" />
    <Skeleton className="h-4 w-24" />
    <Skeleton className="h-4 w-16" />
    <Skeleton className="h-4 w-20" />
  </div>
  {ROWS.map((row) => (
    <div className="grid grid-cols-4 gap-4" key={row}>
      <Skeleton className="h-4 w-full" />
      <Skeleton className="h-4 w-full" />
      <Skeleton className="h-4 w-full" />
      <Skeleton className="h-4 w-full" />
    </div>
  ))}
</div>

FAQ

Is this the Table component?

These rows are a CSS grid of Skeleton bars. The header and each body row are grid grid-cols-4 gap-4. Match the bars to the cells in your Table.

How is the header separated?

The header adds border-b pb-3. Its four bars are h-4 at w-20, w-24, w-16 and w-20. The block is max-w-2xl with gap-3 between rows.

How many body rows are there?

Five, from ROWS. Each cell is h-4 w-full, so the bar fills its grid column.

Do header and body bars pulse together?

Yes. They are all Skeleton, so they share animate-pulse, bg-muted and the style's radius. data-slot="skeleton" is on each bar.

How do I line the bars up with real cells?

Keep grid-cols-4 and h-4 if the loaded table has four columns of one line. Change a bar's width class when that column's text is shorter than the column.

Should the table bars be hidden?

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

API Reference

Skeleton

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