Table

Tables display data in rows and columns which make users compare and analyze information easier.

Simple

Simple Table example.

Compact

Table come with compact view which let us display more data.

Sorting

Columns can be sorted by selecting table headers

Filtering

Filtering example.

Pagination

Table can works with Pagination component.

Group

Grouping example.

Row Selection

Row selection example.

Expanding

Row expand example.

SubComponent

Row expand with sub component

Editable

Cell editable example

Drag & Drop

Example of implementing react-dnd to the table.

Resizable

Column resize example.

API

Table
PropDescriptionTypeDefault
asElementRender elementstring'table'
cellBorderWhether display cell borderbooleanfalse
compactWhether display table on compact viewbooleanfalse
hoverableWhether table row able to hoverbooleantrue
overflowWhether allow table content overflowbooleantrue
Table.THead
PropDescriptionTypeDefault
asElementRender elementstring'thead'
Table.TBody
PropDescriptionTypeDefault
asElementRender elementstring'tbody'
Table.TFoot
PropDescriptionTypeDefault
asElementRender elementstring'tfoot'
Table.Tr
PropDescriptionTypeDefault
asElementRender elementstring'tr'
Table.Th
PropDescriptionTypeDefault
asElementRender elementstring'th'
Table.Td
PropDescriptionTypeDefault
asElementRender elementstring'td'
Table.Sorter
PropDescriptionTypeDefault
sortSort statusfalse | 'asc' | 'desc'-

Dependencies

React Table

Most of the examples above were integrated with react-table, its is lightweight and extensible data table component for materialize, filter, sort, group, aggregate, paginate and display massive data. Vist the official docs for futher examples & hooks usage.