DataGrid
constSource L430Virtualized TanStack data grid with sorting, filtering, resizing, pinning, visibility, and row selection.
const DataGrid = DataGridForwardRef as DataGridComponent<DataGrid />
Virtualized TanStack data grid with sorting, filtering, resizing, pinning, visibility, and row selection.
This is a live example. Interact with the available controls and use the keyboard to inspect the component's states and behavior.
pnpm dlx aq-ui@alpha add data-gridImport the parts you need, then jump to an export for its contract.
"use client"
import { DataGrid } from "@/components/ui/data-grid"
<DataGrid />Virtualized TanStack data grid with sorting, filtering, resizing, pinning, visibility, and row selection.
const DataGrid = DataGridForwardRef as DataGridComponentType contract for DataGridProps.
interface DataGridProps<TData, TValue> extends Omit< React.ComponentPropsWithoutRef<"div">, "children" >| Name | Type |
|---|---|
columns | ColumnDef<TData, TValue>[] |
data | TData[] |
height? | number | string |
estimateRowHeight? | number |
overscan? | number |
emptyMessage? | React.ReactNode |
className? | string |
enableRowSelection? | boolean |
getRowId? | (row: TData, index: number) => string |
toolbar? | (table: TanStackTable<TData>) => React.ReactNode |
onRowSelectionChange? | (selection: RowSelectionState) => void |
button, utils
@tanstack/react-table@^8.21.3, @tanstack/react-virtual@^3.13.12, lucide-react@^1.31.0
Projects
48 virtualized records