packages/ag-grid-react/README.md
</picture>
</a>
<div align="center">
<h4><a href="https://www.ag-grid.com?utm_source=ag-grid-react-readme&utm_medium=repository&utm_campaign=github">π Website</a> β’ <a href="https://www.ag-grid.com/react-data-grid/getting-started/?utm_source=ag-grid-react-readme&utm_medium=repository&utm_campaign=github">π Documentation</a> β’ <a href="https://www.ag-grid.com/community?utm_source=ag-grid-react-readme&utm_medium=repository&utm_campaign=github">ποΈ Community</a></h4>
</div>
<a href="https://github.com/ag-grid/ag-grid/releases">
</a>
<a href="https://www.npmjs.com/package/ag-grid-react">
</a>
<a href="https://github.com/ag-grid/ag-grid">
</a>
<a href="https://github.com/ag-grid/ag-grid">
</a>
<a href="https://sonarcloud.io/dashboard?id=ag-grid-community">
</a>
<a href="https://npm.io/package/ag-grid-react">
</a>
<a href="https://github.com/ag-grid/ag-grid/graphs/commit-activity">
</a>
<a href="https://github.com/ag-grid/ag-grid/network/dependents">
</a>
<!-- START MAIN DESCRIPTION -->
<p>AG Grid is a <strong>fully-featured</strong> and <strong>highly customizable</strong> React Data Grid. It delivers <strong>outstanding performance</strong> and has <strong>no third-party dependencies</strong>.</p>
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 React 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 | β | β |
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.
<details open> <summary>π¦ <b>Financial Demo</b></summary> <p>Financial data example featuring live updates and sparklines:</p> <a href="https://www.ag-grid.com/example-finance/?utm_source=ag-grid-react-readme&utm_medium=repository&utm_campaign=github"> <picture> <source srcset="https://github.com/ag-grid/ag-grid/blob/latest/readme-assets/finance-demo-light.gif?raw=true" media="(prefers-color-scheme: light)"> <source srcset="https://github.com/ag-grid/ag-grid/blob/latest/readme-assets/finance-demo-dark.gif?raw=true" media="(prefers-color-scheme: dark)"></picture>
</picture>
</picture>
AG Grid is easy to set up - all you need to do is provide your data and define your column structure.
<!-- END QUICK START DESCRIPTION -->$ npm install --save ag-grid-react
1. Register Modules
Register the AllCommunityModule to access all Community features:
import { AllCommunityModule, ModuleRegistry } from 'ag-grid-community';
// Register all Community features
ModuleRegistry.registerModules([AllCommunityModule]);
2. Import the React Data Grid
// React Data Grid Component
import { AgGridReact } from 'ag-grid-react';
3. Define Rows and Columns
const GridExample = () => {
// Row Data: The data to be displayed.
const [rowData, setRowData] = useState([
{ 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.
const [colDefs, setColDefs] = useState([
{ field: 'make' },
{ field: 'model' },
{ field: 'price' },
{ field: 'electric' },
]);
// ...
};
4. React Data Grid Component
return (
// set a height on the parent div because the grid fills the available space
<div style={{ height: 500 }}>
<AgGridReact rowData={rowData} columnDefs={colDefs} />
</div>
);
We also provide Seed Projects to help you get started with common configurations:
<table width="100%"> <thead> <tr> <th>Environment</th> <th>Framework</th> </tr> </thead> <tbody> <tr> <td><a href="https://github.com/ag-grid/ag-grid-seed/tree/main/enterprise/packages/create-react-app">Create React App (CRA)</a></td> <td align="middle"></td> </tr> <tr> <td><a href="https://github.com/ag-grid/ag-grid-seed/tree/main/enterprise/packages/vite-react">Vite</a></td> <td align="middle"></td> </tr> <tr> <td><a href="https://github.com/ag-grid/ag-grid-seed/tree/main/enterprise/packages/create-next-app">Create Next App</a></td> <td align="middle"></td> </tr> <tr> <td><a href="https://github.com/ag-grid/ag-grid-seed/tree/main/enterprise/packages/vite-typescript">Vite - TypeScript</a></td> <td align="middle"></td> </tr> <tr> <td><a href="https://github.com/ag-grid/ag-grid-seed/tree/main/enterprise/packages/webpack5-typescript">Webpack 5 - TypeScript</a></td> <td align="middle"></td> </tr> <tr> <td><a href="https://github.com/ag-grid/ag-grid-seed/tree/main/enterprise/packages/webpack5-javascript">Webpack 5 - React</a></td> <td align="middle"></td> </tr> <tr> <td><a href="https://github.com/ag-grid/ag-grid-seed/tree/main/enterprise/packages/angular-cli">Angular CLI</a></td> <td align="middle"></td> </tr> <tr> <td><a href="https://github.com/ag-grid/ag-grid-seed/tree/main/enterprise/packages/nuxt-vue3">Nuxt</a></td> <td align="middle"></td> </tr> <tr> <td><a href="https://github.com/ag-grid/ag-grid-seed/tree/main/enterprise/packages/vite-vue3">Vite</a></td> <td align="middle"></td> </tr> </tbody> </table>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:
</picture>
</a>
</td>
<td>
<a href="https://www.ag-grid.com/react-data-grid/themes/?utm_source=ag-grid-react-readme&utm_medium=repository&utm_campaign=github">
<picture>
<source srcset="https://github.com/ag-grid/ag-grid/blob/latest/readme-assets/material-theme-light.png?raw=true" media="(prefers-color-scheme: light)">
<source srcset="https://github.com/ag-grid/ag-grid/blob/latest/readme-assets/material-theme.png?raw=true" media="(prefers-color-scheme: dark)">
</picture>
</a>
</td>
</tr>
<tr>
<th>Alpine</th>
<th>Balham</th>
</tr>
<tr>
<td>
<a href="https://www.ag-grid.com/react-data-grid/themes/?utm_source=ag-grid-react-readme&utm_medium=repository&utm_campaign=github">
<picture>
<source srcset="https://github.com/ag-grid/ag-grid/blob/latest/readme-assets/alpine-theme-light.png?raw=true" media="(prefers-color-scheme: light)">
<source srcset="https://github.com/ag-grid/ag-grid/blob/latest/readme-assets/alpine-theme.png?raw=true" media="(prefers-color-scheme: dark)">
</picture>
</a>
</td>
<td>
<a href="https://www.ag-grid.com/react-data-grid/themes/?utm_source=ag-grid-react-readme&utm_medium=repository&utm_campaign=github">
<picture>
<source srcset="https://github.com/ag-grid/ag-grid/blob/latest/readme-assets/balham-theme-light.png?raw=true" media="(prefers-color-scheme: light)">
<source srcset="https://github.com/ag-grid/ag-grid/blob/latest/readme-assets/balham-theme.png?raw=true" media="(prefers-color-scheme: dark)">
</picture>
</a>
</td>
</tr>
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:
<div> <a href="https://www.ag-grid.com/community/tools-extensions/"> <span> React</span> </a> β’ <a href="https://www.ag-grid.com/community/tools-extensions/"> <span> Angular</span> </a> β’ <a href="https://www.ag-grid.com/community/tools-extensions/"> <span> TypeScript</span> </a> β’ <a href="https://www.ag-grid.com/community/tools-extensions/"> <span> Vue</span> </a> β’ <a href="https://www.ag-grid.com/community/tools-extensions/"> <span> Python</span> </a> β’ <a href="https://www.ag-grid.com/community/tools-extensions/"> <span> Svelte</span> </a> β’ <a href="https://www.ag-grid.com/community/tools-extensions/"> <span> SolidJS</span> </a> β’ <a href="https://www.ag-grid.com/community/tools-extensions/"> <span> .NET</span> </a> β’ <a href="https://www.ag-grid.com/community/tools-extensions/"> <span> Rust</span> </a> β’ <a href="https://www.ag-grid.com/community/tools-extensions/"> <span> Laravel</span> </a> </div>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:
<picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=ag-grid/ag-grid&type=Date&theme=dark"/> <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=ag-grid/ag-grid&type=Date"/> </picture>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 [email protected].
ag-grid-community is licensed under the MIT license.
ag-grid-enterprise has a Commercial license.
See the LICENSE file for more info.
<div><h2>AG Charts</h2></div>If you've made it this far, you may be interested in our latest project: AG Charts - The best React 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.
<strong>Follow us to keep up to date with all the latest news from AG Grid:</strong>
<a href="https://x.com/ag_grid"></a> <a href="https://www.linkedin.com/company/ag-grid/"></a> <a href="https://www.youtube.com/c/ag-grid"></a> <a href="https://blog.ag-grid.com"></a>
</div>