Notifications system functions were migrated to
they are no longer depend on context and can be called in any part of application.
Old way with
useNotifications hook will work until version 5.0 release.
@mantine/notifications now exports the following functions:
showNotification– adds given notification to notifications list or queue depending on current state and limit
updateNotification– updates notification that was previously added to the state or queue
hideNotification– removes notification with given id from notifications state and queue
cleanNotifications– removes all notifications from notifications state and queue
cleanNotificationsQueue– removes all notifications from queue
You can now use
styles props to customize notification styles:
Same as with
styles you can now add classes to all components with
classNames prop on MantineProvider.
This approach is useful when you want to styles components with utility based CSS libraries.
You can now set
withCSSVariables prop on MantineProvider to add
Mantine CSS variables from theme to
This option is useful when you want to use Mantine theme values with CSS/SCSS or css-in-js libraries that do not have Mantine theme context.
Then you will be able to use variables anywhere in your CSS:
All components now support arrays in sx prop. It can be to simultaneously use
sx prop and add it from props:
New FloatingTooltip component:
AppShell now supports
they work the same way as
Header component but render content on the opposite side:
Slider and RangeSlider components now support disabled state:
- @mantine/spotlight now exports event based functions to open/close spotlight and perform other actions from anywhere in your application (not only in components)
- Button, Badge, ThemeIcon and Text components now support hex color values in
- Radio now supports setting transition duration and icon customization via props
- Slider and RangeSlider components now support
- Menu, List and Grid components were migrated to context, associated components (
Grid.Col, etc.) can now be wrapper with other components and fragments
useLocalStorageValuehook was renamed to
useLocalStorage(old hook is still exported from
- AppShell no longer parses props of Navbar and Header components, AppShell positioning logic was migrated to context and CSS variables, Navbar and Header components can now be wrapped with other components
- NextLink component was added to
@mantine/nextpackage to simplify Next.js Link usage with Menu
- Global component now supports array syntax for