UNPKG

4.8 kBMarkdownView Raw
1
2![AG Grid HTML5 Grid trusted by the community, built for enterprise](./github-banner.png "AG Grid")
3
4[![CDNJS](https://img.shields.io/cdnjs/v/ag-grid)](https://cdnjs.com/libraries/ag-grid) [![npm](https://img.shields.io/npm/dm/ag-grid-react)](https://www.npmjs.com/package/ag-grid-react) [![Bundle Phobia](https://badgen.net/bundlephobia/minzip/ag-grid-react)](https://bundlephobia.com/result?p=ag-grid-react) [![Github Stars](https://img.shields.io/github/stars/ag-grid/ag-grid?style=social)](https://github.com/ag-grid/ag-grid) [![Twitter](https://img.shields.io/twitter/follow/ag_grid?style=social)](https://twitter.com/ag_grid)
5
6AG Grid React Component
7------
8
9AG Grid is a fully-featured and highly customizable JavaScript data grid.
10It delivers [outstanding performance](https://www.ag-grid.com/example?utm_source=ag-grid-react-readme&utm_medium=repository&utm_campaign=github#/performance/1), has no 3rd party dependencies and integrates smoothly with React as React Component. Here's how our grid looks like with multiple filters and grouping enabled:
11
12![Image of AG Grid showing filtering and grouping enabled.](./github-grid-demo.jpg "AG Grid demo")
13
14
15Features
16--------------
17
18Besides the standard set of features you'd expect from any grid:
19
20* Column Interactions (resize, reorder, and pin columns)
21* Pagination
22* Sorting
23* Row Selection
24
25Here are some of the features that make AG Grid stand out:
26
27* Grouping / Aggregation *
28* Accessibility support
29* Custom Filtering
30* In-place Cell Editing
31* Records Lazy Loading *
32* Server-Side Records Operations *
33* Live Stream Updates
34* Hierarchical Data Support & Tree View *
35* Customizable Appearance
36* Customizable Cell Contents
37* State Persistence
38* Keyboard Navigation
39* Data Export to CSV
40* Data Export to Excel *
41* Excel-like Pivoting *
42* Row Reordering
43* Copy / Paste
44* Column Spanning
45* Pinned Rows
46* Full Width Rows
47* Integrated Charting
48* Sparklines
49
50\* The features marked with an asterisk are available in the [enterprise version](https://www.ag-grid.com/license-pricing?utm_source=ag-grid-react-readme&utm_medium=repository&utm_campaign=github) only.
51
52Check out [developers documentation](https://www.ag-grid.com/react-data-grid?utm_source=ag-grid-react-readme&utm_medium=repository&utm_campaign=github) for a complete list of features or visit [our official docs](https://www.ag-grid.com/features-overview?utm_source=ag-grid-react-readme&utm_medium=repository&utm_campaign=github) for tutorials and feature demos.
53
54Usage Overview
55--------------
56
57Use the setup instructions below or go through [a 5-minute-quickstart guide](https://www.ag-grid.com/react-grid?utm_source=ag-grid-react-readme&utm_medium=repository&utm_campaign=github).
58
59#### Install dependencies
60
61 $ npm i --save ag-grid-community ag-grid-react
62
63#### Import the grid and styles
64
65 import {AgGridReact} from 'ag-grid-react';
66
67 import 'ag-grid-community/styles//ag-grid.css';
68 import 'ag-grid-community/styles//ag-theme-alpine.css';
69
70### Set the grid's configuration in a parent component
71 class App extends Component {
72 constructor(props) {
73 super(props);
74
75 this.state = {
76 columnDefs: [
77 {headerName: "Make", field: "make"},
78 {headerName: "Model", field: "model"},
79 {headerName: "Price", field: "price"}
80
81 ],
82 rowData: [
83 {make: "Toyota", model: "Celica", price: 35000},
84 {make: "Ford", model: "Mondeo", price: 32000},
85 {make: "Porsche", model: "Boxster", price: 72000}
86 ]
87 }
88 }
89 ...
90 }
91
92### Render the grid as the `AgGridReact` child component
93
94 class App extends Component {
95 constructor(props) {...}
96
97 render() {
98 return (
99 <div
100 className="ag-theme-alpine"
101 style={{
102 height: '500px',
103 width: '600px'
104 }}
105 >
106 <AgGridReact
107 columnDefs={this.state.columnDefs}
108 rowData={this.state.rowData}>
109 </AgGridReact>
110 </div>
111 );
112 }
113 }
114
115Issue Reporting
116----------
117If you have found a bug, please report them at this repository `issues` section. If you're using Enterprise version please use the [private ticketing](https://ag-grid.zendesk.com/) system to do that.
118
119
120Asking Questions
121-------------
122
123Look for similar problems on [StackOverflow](https://stackoverflow.com/questions/tagged/ag-grid) using the `ag-grid` tag. If nothing seems related, post a new message there. Do not use GitHub issues to ask questions.
124
125Contributing
126------------
127AG Grid is developed by a team of co-located developers in London. If you want to join the team check out our [jobs listing](https://www.ag-grid.com/ag-grid-jobs-board?utm_source=ag-grid-react-readme&utm_medium=repository&utm_campaign=github) or send your application to info@ag-grid.com.
128
129License
130------------------
131This project is licensed under the MIT license. See the [LICENSE file](./LICENSE.txt) for more info.