Skip to content

Components

TableSkeleton

Loading rows…
Workspace projects
ProjectProjectOwnerOwnerMembersMembers

Component reference

Properties

Use TableSkeleton

Loading rows with real table headings and matching column widths.

Example import style
table-skeleton.tsxTSX
"use client";

import { FloodRoot, TableSkeleton } from "@flood-md/react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <TableSkeleton caption="Workspace projects" rows={4} columns={[
        {id:"project",label:"Project",width:"70%",placeholderLines:2},
        {id:"members",label:"Members",width:"30%",align:"end"}
      ]} />
    </FloodRoot>
  );
}

Design notes

  • Use during initial loading of a plain Table. Keep the expected column widths, caption, density and row count. Use placeholderLines=2 where the eventual cell has a title and secondary line.
  • Body placeholders are decorative. TableSkeleton marks its table busy and announces loading once by default. Use announce=false when the host already owns that message.
  • For DataTable, use its skeleton loading appearance and column placeholderLines so selection, resize and other column tracks keep their geometry.

API reference

PropValuesDefault
captionstringRequired
hideCaptionboolean—
density"compact" | "comfortable"—
stripedboolean—
scrollLabelstring—
maxViewportHeightCSSProperties["maxBlockSize"]—
stickyHeaderboolean—
cellVerticalAlign"top" | "middle" | "bottom"—
columnsreadonly TableSkeletonColumn[]Required
rowsnumber4
animatebooleantrue
announcebooleantrue
loadingLabelstring"Loading rows…"
Native HTML propsOmit<Omit<TableHTMLAttributes<HTMLTableElement>, "children">, "children" | "aria-busy">Forwarded
View TypeScript source