Virtual table
A table that renders only the visible rows, so thousands stay fast.
Row 1 of 50,000
When to use
- Large result sets with sorting, search and keyboard navigation.
When not to use
- There are a few dozen rows; use the data table.
Installation
pnpm dlx shadcn@latest add @caliper/virtual-table
Adds its 4 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
VirtualTable
12 props
Keyboard
- ↓
- Moves to the next item or value.
- ↑
- Moves to the previous item or value.
- PageDown
- Moves by a larger step, or to the next page.
- PageUp
- Moves by a larger step, or to the previous page.
- Home
- Jumps to the first item or the minimum.
- End
- Jumps to the last item or the maximum.
- Space
- Activates the focused control.
- Enter
- Activates the focused control.
Accessibility
It exposes grid, row, columnheader, gridcell, rowgroup, alert and status semantics, with aria-hidden, aria-label, aria-rowcount, aria-colcount, aria-multiselectable and aria-busy kept in step with state. Changes that matter are announced through a live region.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/virtual-table.mdThe index of every part is at /llms.txt.