Styling
Mantine doesnโt use CSS-in-JS: all @mantine/* packages ship native CSS files, which can be imported from @mantine/{package}/styles.css or @mantine/{package}/styles.layer.css.
Similarly, Mantine DataTable ships native CSS files, which can be imported from mantine-datatable/styles.css or mantine-datatable/styles.layer.css.
Importing styles without CSS layers
If your bundler preserves the order of CSS imports (as Vite does, for instance), the simplest approach is to import the styles.css files in the right order, at the root of your application:
Controlling the order of styles with CSS layers
Some bundlers and frameworks (including Next.js) donโt let you control the order in which imported stylesheets are applied.
As the Mantine documentation suggests, you can work around this by using CSS layers.
For example, in a Next.js application you can ensure the correct order of styles by importing the styles.layer.css files and declaring the layer order with the @layer directive, like so:
Or, if you want even more control over the order of styles, you can use the postcss-import plugin to choose your own layer names when importing the styles.css files, and then declare their order with the @layer directive, like so:
Customizing the look of your tables
Mantine DataTable follows the current Mantine theme, so the best way to achieve a consistent look-and-feel is to customize the theme you pass to MantineProvider. When you need to go further, you can:
- use the basic table properties to control borders, spacing, font size, shadow, striping and more;
- set custom colors, class names or styles, as shown in the overriding the default styles example;
- style individual columns and rows.
Migrating from Mantine V6
Now that you understand how styling works, feel free to browse the code examples to see Mantine DataTable in action and learn how to use it, and refer to the type definitions page for an exhaustive list of customizable options.














