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.2 or later. Update React before migrating. If you cannot update React yet, continue using Mantine 8.x.
Update dependencies
- Update all
@mantine/*packages to version 9.7.3 - 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:
Light variant color changes
In Mantine 9, the light variant CSS variables were changed to use solid color values
instead of transparency. If you need to keep 8.x behavior during migration,
use v8CssVariablesResolver:
Form resolvers
In 9.x, @mantine/form has built-in support for Standard Schema.
If your schema library supports Standard Schema (Zod v4, Valibot, ArkType), use the built-in
schemaResolver instead of a dedicated resolver package:
Example with 8.x:
Example with 9.x using Standard Schema (recommended):
TypographyStylesProvider
- The TypographyStylesProvider component was renamed to Typography:
Popover and Tooltip positionDependencies prop
The Popover and Tooltip components no longer accept the positionDependencies prop.
Remove it, the position is now recalculated automatically.
use-fullscreen hook changes
The use-fullscreen hook was split into two hooks: useFullscreenElement and useFullscreenDocument.
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.
useMouse now tracks the position over the element that ref is assigned to, use useMousePosition
to track the position over the document.
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.
To observe an external element, use useMutationObserverTarget instead.
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 now uses native CSS gap property instead of negative margins.
Remove overflow="hidden" from your Grid components, it is no longer needed to prevent content overflow:
useLocalStorage and useSessionStorage return type
The useLocalStorage and useSessionStorage hooks now include undefined in the
return type when no defaultValue is provided. Update your code to handle undefined
or provide defaultValue:
The same change applies to readLocalStorageValue and readSessionStorageValue.
useHeadroom returns object instead of boolean
The useHeadroom hook now returns an object with pinned and scrollProgress properties
instead of a boolean:
Default border-radius change
In 8.x, the default border-radius (theme.defaultRadius) was sm (4px).
In 9.x, the default border-radius was changed to md (8px).
To keep the previous behavior, set defaultRadius to sm in the theme:
Notifications pauseResetOnHover default change
In 8.x, hovering over a notification paused the auto close timer only for that notification.
In 9.x, hovering over any notification pauses the auto close timer of all
visible notifications. To keep the previous behavior, set pauseResetOnHover="notification":