Usage
VirtualizedList from @prepared911/ui/virtualized-list is the list for thousands of rows: roster feeds, log tails, and other single-column collections. Every row stays in the DOM. Rows outside the viewport skip layout and paint through content-visibility: auto, so find-in-page, the accessibility tree, and keyboard focus still cover the whole list. estimatedItemSize reserves space for a row the browser has not laid out yet; after a row renders once, the browser remembers its real height.
The figure above is the docs anatomy (viewport, row, empty state). Import the component from @prepared911/ui/virtualized-list, not @prepared911/ui-core.
Scrollable drops frames.Scrollable; it is simpler.DataTable, which windows its rows.EmptyState pattern with a concrete next step, passed as emptyContent.getItemKey when rows insert or reorder. The default key is the index.--space-4 margin for the focus ring.estimatedItemSize close to the typical row height in pixels. A wrong estimate only makes the scrollbar approximate until rows render. Variable heights need no per-index function.onEndReached fires when the end of the list scrolls into view, and pauses while loadingRow or errorRow is showing.reverseOrder pins the newest row to the visual block end, as in a chat log. Indexes still count from the first item.Do
scrollRegionLabel when the list scrolls and no row holds a focusable control.Don't
className or style. The component does not take them.Tab reaches a control in any row, including a row the browser has not laid out, and focusing it scrolls that row into view. See Accessibility.
Scrollable for a short list.