Data

Table

Rows and columns on a rounded surface: sortable headers, density, stripes, sticky header, and cards on phones.
import { Table, TableHeader, TableBody, TableRow, TableHead, TableCell, TableCaption, TableFooter } from "pleate/table";

Sortable, stacks on phones

Bookings this week. On phones each row becomes a card.
BookingCityStatus
BookingHT-2042GuestOmar HaddadCityKyotoNights6Total€1,290StatusPending
BookingHT-2045GuestAiko TanakaCityHanoiNights5Total€640StatusConfirmed
BookingHT-2044GuestJonas BergCityNaplesNights4Total€512StatusCancelled
BookingHT-2041GuestSofia RossiCityLisbonNights3Total€384StatusConfirmed
BookingHT-2043GuestChiara BianchiCitySevilleNights2Total€218StatusConfirmed

Loading and empty

GuestCityTotal

Props

density

Row height.

"comfortable" | "compact"default "comfortable"

striped

Tint every other row.

booleandefault false

hoverable

Highlight the row under the pointer.

booleandefault true

stickyHeader

Keep the header visible while the body scrolls.

booleandefault false

loading

Skeleton rows in place of the body while data loads.

booleandefault false

columns

Cells per skeleton row, to match your columns.

numberdefault 4

skeletonRows

How many skeleton rows.

numberdefault 4

empty

Empty state shown instead of the body rows.

{ icon?, title, description?, actions? }

stackOnMobile

Rows become cards below md; set TableCell label.

boolean

TableHead sort / onSort / align

Sortable column.

"asc" | "desc" | false / () => void / "start" | "center" | "end"

Accessibility

  • Sortable headers are buttons inside th with aria-sort.
  • Stacked rows keep the real table semantics; headers stay for screen readers.