Material Table / data-grid
Data table
This package is the community edition of the data grid component. It's part of Material-UI X, an open core extension of Material-UI, with advanced components.
Installation / Install From NPM
Install the package in your project directory with:
// with npm
npm install @material-ui/data-grid
// with yarn
yarn add @material-ui/data-grid
This component has two peer dependencies that you will need to install as well.
"peerDependencies": {
"@material-ui/core": "^4.12.0 || ^5.0.0-beta.0",
"react": "^17.0.0"
},
Data table Source Code :
The Table
component has a close mapping to the native <table>
elements. This constraint makes building rich data tables challenging.
The DataGrid
component is designed for use-cases that are focused around handling a large amounts of tabular data. While it comes with a more rigid structure, in exchange, you gain more powerful features.
Source Code
DataGrid component ::
you can use this Data Grid Component as a Table
Installation : x-data-grid
Using your favorite package manager, install @mui/x-data-grid-pro
for the full-featured enterprise grid, or @mui/x-data-grid
for the free community version.
// with npm
npm install @mui/x-data-grid
// with yarn
yarn add @mui/x-data-grid
import DataGrid component , here is the example..
This component has two peer dependencies that you will need to install as well.
"peerDependencies": {
"@material-ui/core": "^4.12.0 || ^5.0.0-beta.0",
"react": "^17.0.0"
},
Here you can find, the DataGrid component having in Material UI, by using this grid you can import API data OR you can use data, which is having in js data types, here you can see the example