useTableVirtualization@astryxdesign/core v0.7.5 · useTableVirtualization

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. Mounted rows retain native table semantics and full-table positions; unmounted rows are not promised screen-reader discovery.

ts
import {useTableVirtualization} from '@astryxdesign/core/Table'

Parameters

ParamTypeDescription
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.

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.
bash
npx shadcn@4.19.0 add https://astryx-i3u9rbrjt-fbopensource.vercel.app/shadcn/hooks/use-table-virtualization.json