Skip to content

Components

ListSkeleton

Loading activity…

Component reference

Properties

Use ListSkeleton

Loading rows that share the spacing and tracks of a data list.

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

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

export function Example() {
  return (
    <FloodRoot>
      <ListSkeleton label="Loading activity…" rows={3} media description metadata dividers={false} />
    </FloodRoot>
  );
}

Design notes

  • Use during the initial load of a DataList. Match the number of expected rows, density, media, descriptions, metadata and dividers to the destination list.
  • Set reserveSelectionSpace when the loaded DataList has a checkbox track. The skeleton keeps the title aligned without exposing an interactive checkbox.
  • The placeholder list is decorative. Localize the loading announcement through label. Keep that message outside any ancestor marked aria-busy.
  • Leave the current results in place during a background refresh. For a DataTable body, use loadingAppearance=skeleton on DataTable.

API reference

PropValuesDefault
labelstringRequired
rowsnumber3
densityDataListProps["density"]"comfortable"
mediabooleanfalse
descriptionbooleanfalse
metadatabooleanfalse
reserveSelectionSpaceboolean—
dividersboolean—
animatebooleantrue
Native HTML propsOmit<HTMLAttributes<HTMLDivElement>, "children" | "role">Forwarded
View TypeScript source