Apply the Lightdash frontend style guide when working on React components, migrating Mantine v6 to v8, or styling frontend code. Use when editing TSX files, fixing styling issues, or when user mentions Mantine, styling, or CSS modules.
Apply these rules when working on any frontend component in packages/frontend/.
CRITICAL: We are migrating from Mantine 6 to 8. Always upgrade v6 components when you encounter them.
When creating/updating components:
@mantine-8/core importsstyle or styles or sx props--mantine-color-${color}-text: for text on filled background--mantine-color-${color}-filled: for filled background (strong color)--mantine-color-${color}-filled-hover: for filled background on hover--mantine-color-${color}-light: for light background--mantine-color-${color}-light-hover: for light background on hover (light color)--mantine-color-${color}-light-color: for text on light background--mantine-color-${color}-outline: for outlines--mantine-color-${color}-outline-hover: for outlines on hover// ❌ Mantine 6
import { Button, Group } from '@mantine/core';
<Group spacing="xs" noWrap>
<Button sx={{ mt: 20 }}>Click</Button>
</Group>;
// ✅ Mantine 8
import { Button, Group } from '@mantine-8/core';
<Group gap="xs" wrap="nowrap">
<Button mt={20}>Click</Button>
</Group>;
spacing → gapnoWrap → wrap="nowrap"sx → Component props (e.g., mt, w, c) or CSS modulesleftIcon → leftSectionrightIcon → rightSectionThe goal is to use theme defaults whenever possible. Style overrides should be the exception, not the rule.
mantine8Theme.tsmt="xl" w={240})styles prop (always use CSS modules instead)sx prop (it's a v6 prop)style prop (inline styles)If you find yourself applying the same style override multiple times, add it to the theme in mantine8Theme.ts:
// In src/mantine8Theme.ts - inside the components object