Data Grid - Overlays
The various Data Grid overlays.
Loading overlay
To display a loading overlay and signify that the Data Grid is in a loading state, set the loading
prop to true
.
The Data Grid supports 3 loading overlay variants out of the box:
skeleton
: an animated placeholder of the Data Grid.linear-progress
: an indeterminate linear progress bar.circular-progress
: a circular loading spinner.
The type of loading overlay to display can be set via slotProps.loadingOverlay
for the following two props:
variant
(default:linear-progress
): whenloading
and there are rows in the table.noRowsVariant
(default:skeleton
): whenloading
and there are not any rows in the table.
<DataGrid
{...data}
loading
slotProps={{
loadingOverlay: {
variant: 'linear-progress',
noRowsVariant: 'skeleton',
},
}}
/>
Skeleton
An animated placeholder of the Data Grid.
Linear progress
An indeterminate linear progress bar.
Circular progress
A circular loading spinner.
Custom component
If you want to customize the no-rows overlay, a component can be passed to the loadingOverlay
slot.
In the following demo, a labeled determinate CircularProgress component is rendered in place of the default loading overlay, with some additional Loading rows… text.
No rows overlay
The no-rows overlay is displayed when the Data Grid has no rows.
Custom component
If you want to customize the no-rows overlay, a component can be passed to the noRowsOverlay
slot and rendered in place.
In the following demo, an illustration is added on top of the default "No rows" message.
No results overlay
The no-results overlay is displayed when the Data Grid has no results after filtering.
Custom component
If you want to customize the no results overlay, a component can be passed to the noResults
slot and rendered in place.
In the following demo, an illustration is added on top of the default "No results found" message.