Usage
Returns an opaque capability for fixed-height flat-row Table windowing. Pass the capability to Table.virtualization and keep the complete data, columns, explicit stable idKey and plugins on Table. Sizes are positive finite CSS pixels. Supported rows use single-line content; explicit wrapping, arbitrary custom renderers, non-flat rows or invalid identity use ordinary full rendering. Windowing uses the Table-owned scroll wrapper; a caller-provided scrollWrapper takes diagnostic full-render fallback. Mounted rows retain native table semantics and full-table positions; unmounted rows are not promised screen-reader discovery.
tsimport {useTableRowsVirtualization} from '@astryxdesign/core/Table'
Parameters
| Param | Type | Description |
|---|---|---|
rowHeightrequired | number | Total body-row pitch in CSS pixels, including existing density padding and collapsed borders. Must fit text and supported controls without reducing their size. |
viewportHeightrequired | number | Bounded Table-owned viewport height in CSS pixels. Table accounts for its headers and chrome. |
Examples
Common configurations, variations, and states.A Table with 1,000 product rows in a fixed-height viewport. Scroll vertically to mount the visible rows. The caller keeps all data and columns; this hook does not virtualize columns.
Use with shadcn
Already using the shadcn registry workflow? Install the real Astryx package and a local public re-export. Component implementation source stays in Astryx.
This install URL expires with the draft preview.bashnpx shadcn@4.19.0 add https://astryx-l64m0m99l-fbopensource.vercel.app/shadcn/hooks/use-table-rows-virtualization.json