8.x → 9.x migration guide
Migrate with LLM agents
You can use LLM agents to assist with the migration from 8.x to 9.x. The LLM documentation includes all breaking changes and migration steps in a format optimized for AI coding tools. Copy the link to the md documentation file and ask your AI agent to perform the migration for you.
Migrate with LLMPrerequisites
Mantine 9.x requires React 19 or later. If your project uses an older React version, you need to update it before migrating to Mantine 9.x. If you cannot update React to 19+ yet, you can continue using Mantine 8.x until you are ready to update React and migrate to Mantine 9.x.
Update dependencies
- Update all
@mantine/*packages to version 9.0.0-alpha.2 - If you use
@mantine/tiptappackage, update all@tiptap/*packages to the latest3.xversion - If you use
@mantine/chartspackage, updaterechartsto the latest3.xversion
use-form TransformValues type
The second generic type of the useForm hook is now the type of transformed values
instead of the transform function type. New usage example:
Text color prop
The color prop of the Text and Anchor components was removed.
Use the c style prop instead:
Form resolvers
The @mantine/form package no longer exports schema resolvers; use dedicated packages instead:
Example with 8.x:
Example with 9.x:
TypographyStylesProvider
- The TypographyStylesProvider component was renamed to Typography:
Popover and Tooltip positionDependencies prop
The Popover and Tooltip components no longer accept the positionDependencies prop; it is no longer required
– the position is now calculated automatically.
use-fullscreen hook changes
The use-fullscreen hook was split into two hooks: useFullscreenElement and useFullscreenDocument.
This change was required to fix a stale ref issue in the previous implementation.
New usage with the document element:
New usage with a custom target element:

use-mouse hook changes
The use-mouse hook was split into two hooks: useMouse and useMousePosition.
This change was required to fix a stale ref issue in the previous implementation.
Previous usage with the document element:
New usage with document:
Mouse coordinates { x: 0, y: 0 }
use-mutation-observer hook changes
The use-mutation-observer hook now uses the new callback ref approach. This change was required to fix stale ref issues and improve compatibility with dynamic node changes.
Previous usage (8.x):
New usage (9.x):
Rename hooks types
@mantine/hooks types were renamed for consistency; rename them in your codebase:
UseScrollSpyReturnType→UseScrollSpyReturnValueStateHistory→UseStateHistoryValueOS→UseOSReturnValue
Collapse in -> expanded
The Collapse component now uses the expanded prop instead of in:
Spoiler initialState -> defaultExpanded
The Spoiler component's initialState prop was renamed to defaultExpanded for consistency with other Mantine components:
Grid gutter -> gap
The Grid component gutter prop was renamed to gap for consistency with other layout components
(like Flex and SimpleGrid). Additionally, new rowGap and columnGap props
were added to allow separate control of vertical and horizontal spacing:
Grid overflow="hidden" no longer required
The Grid component no longer uses negative margins for spacing between columns.
It now uses native CSS gap property, so you can safely remove overflow="hidden" from your
Grid components — it is no longer needed to prevent content overflow: