FragiolaData Grid

@fragiola/data-grid · React

A billion cells, and not a line of CSS from us.

A headless data grid: both axes virtualized, a scrollbar that covers the whole dataset, windows you load data by, and the APG grid keyboard. Render it as a table or as divs, and style it your way.

One million rows by a thousand columns, five themes:
Theme
See the code →

What it never ships

  • CSS
  • Icons
  • Text
  • A fixed DOM
  • A design system

The state is exposed as data-* attributes and ARIA, so any styling solution works: Tailwind, plain CSS, CSS modules, CSS-in-JS. The examples use Fragiola UI and its palettes.

An API that reads like your data

One generic, the row type. Columns are plain objects, rows an array or a getter, and every change is a command you can veto or rewrite.

people.tsx
const columns: Column<Person>[] = [
    { key: "name", name: "Name", width: 180 },
    { key: "salary", name: "Salary", width: 120, renderCell: ({ row }) => money(row.salary) },
];

<DataGrid.Root columns={columns} rows={people}>
    <DataGrid.Grid aria-label="People">
        <DataGrid.Header />
        <DataGrid.Body />
    </DataGrid.Grid>
</DataGrid.Root>