WarUI documentation

Loading placeholder rows

experimental

Show fixed-height placeholder rows for indices that are in the scroll range but not loaded yet.

Live example

Expected behavior

Unloaded rows render as placeholders with the row height already fixed. When a block resolves, its placeholders are replaced in place with no change in scroll position. Shimmer is disabled when reduced motion is preferred.

Source

const api = createGrid({
  rows: [],
  columns,
  rowModel: 'remote',
  remoteSource,
  placeholderStyle: 'skeleton',
  placeholderRenderer: ({ index, loadState }) => loadState === 'error' ? 'Retry' : '',
});
const placeholder = api.getPlaceholder(index); // undefined once loaded

API reference

GRID-A04-F03 API
KindNameTypeDescription
OptionplaceholderStyle—'skeleton', 'text' or 'none'.
OptionplaceholderRenderer—Receives the row index and loadState and returns text.
MethodgetRemoteRowNode—Returns the row's loadState and data.
MethodgetPlaceholder—Describes the placeholder of an unloaded index.