Usage
Returns an opaque capability for Table column windowing. Pass the capability to Table.virtualization and keep the complete data, columns, explicit stable idKey and plugins on Table. Columns keep their declared widths: an overflowing Table renders at its minimum width, and the window uses the width each column has there. Pinned columns from useTableStickyColumns always mount; only the columns between the pinned runs window, with a few overscan columns on each side. When the Table's scroll area is at least as wide as the Table's minimum width, every column mounts. Supported tables have one header row, flat rows, no cell that spans columns and single-line content; explicit wrapping, arbitrary custom renderers, non-flat rows, invalid identity, a caller-provided scrollWrapper or a min-width wider than the column floors render every column. Windowing columns together with useTableRowsVirtualization is not available yet: the Table windows its rows and renders every column. Mounted cells keep native table semantics and full-table column positions; unmounted columns are not promised screen-reader discovery.
tsimport {useTableColumnsVirtualization} from '@astryxdesign/core/Table'
Parameters
| Param | Type | Description |
|---|---|---|
initialViewportWidthrequired | number | The inline viewport width in CSS pixels that the first window plans for, on the server and before the viewport is measured. It does not size the Table: after mount, the measured width of the Table's scroll area sets the window. Table accounts for its pinned 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-psmky5ane-fbopensource.vercel.app/shadcn/hooks/use-table-columns-virtualization.json