Skip to content

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

Free

Table with Pagination Skeleton for Ark UI

A table of five loading rows, with a footer that reserves a page count and five page buttons.

A header and five rows of four cells, then a footer: one bar for the page summary and five squares for the page buttons.

Use it so the pager holds its place before the rows arrive. When the pages are real, put Pagination under the table. In React, Ark UI does not know how many pages there are.

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-4">
  <div className="flex 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>
  <div className="flex items-center justify-between border-t pt-3">
    <Skeleton className="h-4 w-32" />
    <div className="flex gap-2">
      <Skeleton className="size-8 rounded-md" />
      <Skeleton className="size-8 rounded-md" />
      <Skeleton className="size-8 rounded-md" />
      <Skeleton className="size-8 rounded-md" />
      <Skeleton className="size-8 rounded-md" />
    </div>
  </div>
</div>

FAQ

How is the table block built?

A max-w-2xl column with gap-4. Inside, header and rows use gap-3. Header and each row are grid grid-cols-4 gap-4, and the header adds border-b pb-3.

What widths are the header bars?

h-4 at w-20, w-24, w-16 and w-20. Each body cell is h-4 w-full.

How many body rows are there?

Five, from ROWS. They sit above the footer in the same gap-3 stack.

How do I match a real pager?

Keep five size-8 squares if you show five page buttons, and h-4 w-32 for the page summary. border-t is what separates the footer from the rows.

Should the pager bars be hidden?

Set aria-hidden on each Skeleton when nearby text already says the table is loading. The squares stand in for the page buttons.

API Reference

Skeleton

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