ag-grid-community, handsontable, and react-data-grid are powerful libraries for displaying and interacting with large datasets in web applications. ag-grid-community is the free version of the AG Grid suite, offering enterprise-grade features like filtering and sorting with a focus on performance. handsontable provides a spreadsheet-like experience, emphasizing data entry and Excel-compatible features. react-data-grid is built specifically for React, adopting idiomatic React patterns for a more seamless integration within the React ecosystem.
When building data-intensive applications in React, choosing the right grid component can make or break your user experience. ag-grid-community, handsontable, and react-data-grid are three of the most popular options, but they solve the problem in fundamentally different ways. Let's compare how they handle rendering, data flow, and customization.
ag-grid-community is built as a framework-agnostic engine with React wrappers.
ag-grid-react.// ag-grid-community (via ag-grid-react)
import { AgGridReact } from 'ag-grid-react';
function Grid() {
const [rowData, setRowData] = useState([]);
const [columnDefs] = useState([{ field: "make" }, { field: "model" }]);
return (
<div className="ag-theme-alpine">
<AgGridReact rowData={rowData} columnDefs={columnDefs} />
</div>
);
}
handsontable also uses a framework-agnostic core with a React wrapper.
// handsontable
import { HotTable } from '@handsontable/react';
import { registerAllModules } from 'handsontable/registry';
registerAllModules();
function Grid() {
const data = [['A1', 'B1'], ['A2', 'B2']];
return (
<HotTable data={data} colHeaders={true} rowHeaders={true} />
);
}
react-data-grid is built specifically for React from the ground up.
// react-data-grid
import DataGrid from 'react-data-grid';
function Grid() {
const [rows, setRows] = useState([{ id: 1, name: 'A' }]);
const columns = [{ key: 'name', name: 'Name' }];
return (
<DataGrid columns={columns} rows={rows} />
);
}
ag-grid-community supports both controlled and uncontrolled modes but leans towards uncontrolled for performance.
// ag-grid-community: Updating data
const onCellValueChanged = (event) => {
console.log('New value:', event.newValue);
// Update external state if needed
};
<AgGridReact onCellValueChanged={onCellValueChanged} />
handsontable manages data internally but syncs with React props.
afterChange.// handsontable: Handling changes
const afterChange = (changes, source) => {
if (source !== 'loadData') {
console.log('Data changed:', changes);
}
};
<HotTable data={data} afterChange={afterChange} />
react-data-grid enforces a controlled component pattern.
rows state explicitly.// react-data-grid: Controlled update
const [rows, setRows] = useState(initialRows);
const handleRowUpdate = (newRow) => {
setRows(prev => prev.map(r => r.id === newRow.id ? newRow : r));
};
<DataGrid rows={rows} onRowsUpdate={handleRowUpdate} />
ag-grid-community uses cell renderers for custom content.
// ag-grid-community: Custom cell renderer
const CellRenderer = (props) => <span style={{ color: 'red' }}>{props.value}</span>;
const columnDefs = [{
field: "status",
cellRenderer: CellRenderer
}];
<AgGridReact columnDefs={columnDefs} />
handsontable uses renderers that manipulate DOM elements directly.
// handsontable: Custom renderer
const customRenderer = (instance, td, row, col, prop, value) => {
td.innerHTML = `<strong>${value}</strong>`;
};
<HotTable columns={[{ renderer: customRenderer }]} />
react-data-grid allows standard React components for cells.
// react-data-grid: Custom cell component
const CustomCell = ({ row }) => <div className="custom">{row.name}</div>;
const columns = [{
key: 'name',
name: 'Name',
renderCell: (props) => <CustomCell row={props.row} />
}];
<DataGrid columns={columns} rows={rows} />
ag-grid-community is optimized for massive datasets (100k+ rows).
// ag-grid-community: Handles 100k rows out of the box
<AgGridReact rowData={largeDataset} rowBuffer={10} />
handsontable also supports virtualization but can struggle with complex formulas.
// handsontable: Virtualization enabled by default
<HotTable data={largeDataset} licenseKey="non-commercial-and-evaluation" />
react-data-grid uses windowing for virtualization.
// react-data-grid: Windowing handled internally
<DataGrid rows={largeDataset} rowHeight={35} />
ag-grid-community includes advanced filtering and sorting out of the box.
editable: true on columns.// ag-grid-community: Enable editing
const columnDefs = [{
field: "price",
editable: true,
filter: "agNumberColumnFilter"
}];
handsontable excels at editing with Excel-like shortcuts.
// handsontable: Enable features
<HotTable
data={data}
filters={true}
dropdownMenu={true}
contextMenu={true}
/>
react-data-grid provides basic sorting and filtering.
// react-data-grid: Basic sorting
const columns = [{
key: 'name',
name: 'Name',
sortable: true
}];
<DataGrid columns={columns} rows={rows} defaultColumnOptions={{ sortable: true }} />
While the differences are clear, all three libraries share common goals and capabilities.
// Shared concept: Column definition
// ag-grid: { field: "name" }
// handsontable: { data: "name" }
// react-data-grid: { key: "name", name: "Name" }
// ag-grid: onRowClicked
// handsontable: afterOnCellMouseDown
// react-data-grid: onRowClick
// ag-grid: suppressColumnVirtualisation
// handsontable: stretchH: 'all'
// react-data-grid: style={{ width: '100%' }}
// All support generic types for row data
interface Row { id: number; name: string; }
// <AgGridReact<Row> /> or <DataGrid<Row> />
// Example: Redux integration pattern
// Dispatch actions on grid events to update global state
| Feature | Shared by All Three |
|---|---|
| Core Function | π Tabular data display |
| React Support | βοΈ Official wrappers or native |
| Virtualization | β‘ Built-in row rendering |
| Type Safety | π‘οΈ TypeScript definitions |
| Interactivity | π±οΈ Sorting, filtering, editing |
| Feature | ag-grid-community | handsontable | react-data-grid |
|---|---|---|---|
| Architecture | ποΈ Agnostic core + wrapper | ποΈ Agnostic core + wrapper | βοΈ Native React component |
| Data Flow | π Mixed controlled/uncontrolled | π Mixed controlled/uncontrolled | π Fully controlled |
| Editing Experience | π Standard grid editing | π Excel-like editing | π Standard grid editing |
| Performance | π Enterprise-grade (100k+ rows) | π High (spreadsheet optimized) | π Moderate (React optimized) |
| Customization | π¨ High (via renderers) | π¨ Medium (DOM manipulation) | π¨ High (React components) |
| License | π MIT (Community) | π Proprietary/Non-OSI | π MIT |
ag-grid-community is like a heavy-duty truck πβbuilt for hauling massive loads of data with reliability. It's the go-to for enterprise dashboards where performance and feature depth matter most, provided you stay within the community feature limits.
handsontable is like a digital spreadsheet πβperfect for users who need Excel-like power in the browser. It shines in financial apps or data entry tools where copy-paste and cell formulas are daily requirements.
react-data-grid is like a custom-built car ποΈβdesigned specifically for the React ecosystem. It offers the best developer experience for React teams who want full control over state and rendering without fighting against a framework-agnostic core.
Final Thought: All three libraries solve the same problem but cater to different priorities. If performance and features are king, pick ag-grid-community. If spreadsheet behavior is required, pick handsontable. If React integration and simplicity are top priorities, pick react-data-grid.
Choose ag-grid-community if you need a robust, high-performance grid with advanced features like grouping, pivoting, and extensive filtering without paying for a license. It is ideal for complex dashboards and data-heavy applications where performance is critical, and you can work within the limits of the community feature set.
Choose handsontable if your application requires a spreadsheet-like interface with strong support for data entry, copy-paste from Excel, and cell-level editing. It is best suited for financial tools, data management systems, or any scenario where users expect Excel-like behavior in the browser.
Choose react-data-grid if you want a grid that feels like a native React component, with full control over rendering and state management. It is perfect for projects that prioritize React best practices, custom cell rendering, and a lightweight footprint without the overhead of a larger framework.
AG Grid is a fully-featured and highly customizable JavaScript Data Grid. It delivers outstanding performance, has no third-party dependencies and comes with support for React,
Angular and
Vue.
AG Grid is available in two versions: Community & Enterprise.
ag-grid-community is free, available under the MIT license, and comes with all of the core features expected from a JavaScript Data Grid, including Sorting, Filtering, Pagination, Editing, Custom Components, Theming and more.ag-grid-enterprise is available under a commercial license and comes with advanced features, like AI Toolkit, Integrated Charting, Formulas, Row Grouping, Aggregation, Pivoting, Master/Detail, Server-side Row Model, Find and Exporting in addition to dedicated support from our Engineering team.| Feature | AG Grid Community | AG Grid Enterprise |
|---|---|---|
| MCP Server | β | β (Advanced) |
| Filtering | β | β (Advanced) |
| Sorting | β | β |
| Cell Editing | β | β |
| CSV Export | β | β |
| Drag & Drop | β | β |
| Themes and Styling | β | β |
| Selection | β | β |
| Accessibility | β | β |
| Infinite Scrolling | β | β |
| Pagination | β | β |
| Server-Side Data | β | β (Advanced) |
| Custom Components | β | β |
| AI Toolkit | β | β |
| Integrated Charting | β | β |
| Formulas | β | β |
| Find | β | β |
| Range Selection | β | β |
| Row Grouping and Aggregation | β | β |
| Pivoting | β | β |
| Excel Export | β | β |
| Clipboard Operations | β | β |
| Master/Detail | β | β |
| Tree Data | β | β |
| Column Menu | β | β |
| Context Menu | β | β |
| Tool Panels | β | β |
| Support | β | β |
βΉοΈ Note:
Visit the Pricing page for a full comparison.
We've created several demos to showcase AG Grid's rich feature set across different use cases. See them in action below, or interact with them on our Demo page.
Financial data example featuring live updates and sparklines:
AG Grid is easy to set up - all you need to do is provide your data and define your column structure. Read on for vanilla JavaScript installation instructions, or refer to our framework-specific guides for React,
Angular and
Vue.
$ npm install --save ag-grid-community
1. Provide a Container
Load the AG Grid library and create a container div. The div should have a height because the Data Grid will fill the size of the parent container:
<html lang="en">
<head>
<!-- Includes all JS & CSS for the JavaScript Data Grid -->
<script src="https://cdn.jsdelivr.net/npm/ag-grid-community/dist/ag-grid-community.min.js"></script>
</head>
<body>
<!-- Your Data Grid container -->
<div id="myGrid" style="height: 500px"></div>
</body>
</html>
2. Instantiating the JavaScript Data Grid
Create the Data Grid inside of your container div using createGrid.
// Grid Options: Contains all of the Data Grid configurations
const gridOptions = {};
// Your Javascript code to create the Data Grid
const myGridElement = document.querySelector('#myGrid');
agGrid.createGrid(myGridElement, gridOptions);
3. Define Rows and Columns
// Grid Options: Contains all of the Data Grid configurations
const gridOptions = {
// Row Data: The data to be displayed.
rowData: [
{ make: 'Tesla', model: 'Model Y', price: 64950, electric: true },
{ make: 'Ford', model: 'F-Series', price: 33850, electric: false },
{ make: 'Toyota', model: 'Corolla', price: 29600, electric: false },
],
// Column Definitions: Defines the columns to be displayed.
columnDefs: [{ field: 'make' }, { field: 'model' }, { field: 'price' }, { field: 'electric' }],
};
βΉοΈ Note:
For more information on building Data Grids with AG Grid, refer to our Documentation.
We also provide Seed Projects to help you get started with common configurations:
| Environment | Framework |
|---|---|
| Create React App (CRA) | |
| Vite | |
| Create Next App | |
| Vite - TypeScript | |
| Webpack 5 - TypeScript | |
| Webpack 5 - JavaScript | |
| Angular CLI | |
| Nuxt | |
| Vite |
AG Grid is fully customisable, both in terms of appearance and functionality. There are many ways in which the grid can be customised and we provide a selection of tools to help create those customisations.
You can create your own Custom Components to customise the behaviour of the grid. For example, you can customise how cells are rendered, how values are edited and also create your own filters.
There are a number of different Component Types that you can provide to the grid, including:
To supply a custom cell renderer and filter components to the Grid, create a direct reference to your component within the gridOptions.columnDefs property:
gridOptions = {
columnDefs: [
{
field: 'country', // The column to add the component to
cellRenderer: CountryCellRenderer, // Your custom cell component
filter: CountryFilter, // Your custom filter component
},
],
};
AG Grid has 4 themes, each available in light & dark modes:
| Quartz | Material |
|---|---|
|
|
| Alpine | Balham |
|
|
All AG Grid themes can be customised using the Theming API, or you can create a new theme from scratch with the help of our Theme Builder or Figma Design System.
AG Grid has a large and active community who have created an ecosystem of 3rd party tools, extensions and utilities to help you build your next project with AG Grid, no matter which language or framework you use:
AG Grid is used by 100,000's of developers across the world, from almost every industry. Whilst most of these projects are private, we've curated a selection of open-source projects from different industries where household names use AG Grid, including J.P.Morgan, MongoDB and NASA. Visit our Community Showcase page to learn more.
Founded in 2016, AG Grid has seen a steady rise in popularity and is now the market leader for Data Grids:
AG Grid Enterprise customers have access to dedicated support via ZenDesk, which is monitored by our engineering teams.
If you have found a bug, please report it in this repository's issues section.
Look for similar problems on StackOverflow using the ag-grid tag. If nothing seems related, post a new message there. Please do not use GitHub issues to ask questions.
AG Grid is developed by a team of co-located developers in London. If you want to join the team send your application to info@ag-grid.com.
ag-grid-community is licensed under the MIT license.
ag-grid-enterprise has a Commercial license.
See the LICENSE file for more info.
If you've made it this far, you may be interested in our latest project: AG Charts - The best JavaScript Charting library in the world.
Initially built to power Integrated Charts in AG Grid, we open-sourced this project in 2018. Having seen the steady rise in popularity since then, we have decided to invest in AG Charts with a dedicated Enterprise version (ag-charts-enterprise) in addition to our continued support of ag-charts-community.