Gathering detailed insights and metrics for material-react-table
Gathering detailed insights and metrics for material-react-table
Gathering detailed insights and metrics for material-react-table
Gathering detailed insights and metrics for material-react-table
@material-table/core
Datatable for React based on https://material-ui.com/api/table/ with additional features
material-table
Datatable for React based on https://material-ui.com/api/table/ with additional features
@inbuild/material-react-table
A fully featured Material UI V5 implementation of TanStack React Table V8, written from the ground up in TypeScript.
@mui/x-data-grid
The Community plan edition of the MUI X Data Grid components.
A fully featured Material UI V5 implementation of TanStack React Table V8, written from the ground up in TypeScript
npm install material-react-table
Typescript
Module System
Min. Node Version
Node Version
NPM Version
77
Supply Chain
79.3
Quality
82.7
Maintenance
100
Vulnerability
99.6
License
TypeScript (80.73%)
MDX (16.25%)
HTML (1.69%)
JavaScript (1.26%)
Shell (0.04%)
CSS (0.03%)
Total Downloads
11,130,614
Last Day
4,950
Last Week
179,490
Last Month
742,828
Last Year
7,200,942
MIT License
1,688 Stars
1,566 Commits
502 Forks
15 Watchers
4 Branches
114 Contributors
Updated on Jul 07, 2025
Minified
Minified + Gzipped
Latest Version
3.2.1
Package Id
material-react-table@3.2.1
Unpacked Size
1.97 MB
Size
399.66 kB
File Count
323
NPM Version
10.8.2
Node Version
20.18.1
Published on
Mar 01, 2025
Cumulative downloads
Total Downloads
Last Day
-15.9%
4,950
Compared to previous day
Last Week
-6.3%
179,490
Compared to previous week
Last Month
6.3%
742,828
Compared to previous month
Last Year
113.7%
7,200,942
Compared to previous year
4
7
40
View Documentation
Want to use Mantine instead of Material UI? Check out Mantine React Table
View additional storybook examples
All features can easily be enabled/disabled
Fully Fleshed out Docs are available for all features
View the full Installation Docs
Ensure that you have React 18 or later installed
Install Peer Dependencies (Material UI V6)
1npm install @mui/material @mui/x-date-pickers @mui/icons-material @emotion/react @emotion/styled
1npm install material-react-table
@tanstack/react-table
,@tanstack/react-virtual
, and@tanstack/match-sorter-utils
are internal dependencies, so you do NOT need to install them yourself.
Read the full usage docs here
1import { useMemo, useState, useEffect } from 'react'; 2import { 3 MaterialReactTable, 4 useMaterialReactTable, 5} from 'material-react-table'; 6 7//data must be stable reference (useState, useMemo, useQuery, defined outside of component, etc.) 8const data = [ 9 { 10 name: 'John', 11 age: 30, 12 }, 13 { 14 name: 'Sara', 15 age: 25, 16 }, 17]; 18 19export default function App() { 20 const columns = useMemo( 21 () => [ 22 { 23 accessorKey: 'name', //simple recommended way to define a column 24 header: 'Name', 25 muiTableHeadCellProps: { sx: { color: 'green' } }, //optional custom props 26 Cell: ({ cell }) => <span>{cell.getValue()}</span>, //optional custom cell render 27 }, 28 { 29 accessorFn: (row) => row.age, //alternate way 30 id: 'age', //id required if you use accessorFn instead of accessorKey 31 header: 'Age', 32 Header: () => <i>Age</i>, //optional custom header render 33 }, 34 ], 35 [], 36 ); 37 38 //optionally, you can manage any/all of the table state yourself 39 const [rowSelection, setRowSelection] = useState({}); 40 41 useEffect(() => { 42 //do something when the row selection changes 43 }, [rowSelection]); 44 45 const table = useMaterialReactTable({ 46 columns, 47 data, 48 enableColumnOrdering: true, //enable some features 49 enableRowSelection: true, 50 enablePagination: false, //disable a default feature 51 onRowSelectionChange: setRowSelection, //hoist internal state to your own state (optional) 52 state: { rowSelection }, //manage your own state, pass it back to the table (optional) 53 }); 54 55 const someEventHandler = () => { 56 //read the table state during an event from the table instance 57 console.log(table.getState().sorting); 58 }; 59 60 return ( 61 <MaterialReactTable table={table} /> //other more lightweight MRT sub components also available 62 ); 63}
Open in Code Sandbox
PRs are Welcome, but please discuss in GitHub Discussions or the Discord Server first if it is a large change!
Read the Contributing Guide to learn how to run this project locally.
No vulnerabilities found.
No security vulnerabilities found.