Examples › Asynchronous data loading
When loading data asynchronously, set the fetching property to true while the request is in flight. The DataTable will indicate the loading state by overlaying a Mantine Loader over its rows. Play with the loader properties in the interactive example below:
loaderTypeloaderSizeloaderColorloaderBackgroundBlurCode:
You can customize the loader appearance with the following properties:
loaderSize: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | (string & {}) | number
The loader size. You can also pass a number (in pixels) or any valid CSS size string.loaderType: 'oval' | 'bars' | 'dots'
The loader type. Defaults to the loader type set in your Mantine theme.loaderColor
The loader color. Defaults to the theme’s primary color.loaderBackgroundBlur: number
The loader background blur, in pixels. No blur by default.
If you’re using pagination, the pagination footer will display the loadingText (... by default) while fetching and the total number of records is unknown. The empty state indicator is not displayed while fetching.
Using a custom loader component
If you’re not happy with the standard Mantine Loader types, you can pass your own component to the customLoader property.
In this case, you can’t set the loaderSize, loaderType and loaderColor properties (TypeScript will complain if you do), but you can still use loaderBackgroundBlur.
Here is the code:
Head over to the next example to discover more features.












