Styling
Starting with V7+, all @mantine/* packages are shipped with native CSS files which can be imported from @mantine/{package}/styles.css or @mantine/{package}/styles.layer.css.
Similarly, Mantine DataTable comes with native CSS files which can be imported from mantine-datatable/styles.css or mantine-datatable/styles.layer.css.
Controlling the order of styles with CSS layers
Some bundlers and frameworks (including Next.js) do not allow you to control the order of stylesheets in your application when importing CSS files.
As Mantine documentation suggests, you can mitigate this by making use of CSS layers.
For example, in a Next.js application you could ensure the correct order of styles either by importing the styles.layer.css files and using the @layer directive, like so:
Or, if you want to have even more control over the order of styles, you can make use of the postcss-import plugin to control the layer names when importing the styles.css files, and then use the @layer directive, like so:
Breaking changes in V7
Now that you understand how styling works, feel free to browse the code examples to see the DataTable in action and learn how to use it, and refer to the type definitions page for an exhaustive list of customizable options.














