Breaking changes
- Group component was migrated to flexbox gap, it no longer uses hack with negative margins, thus
withGutter
prop is not longer supported. - Button component no longer supports
link
variant due to Styles API limitations, use Anchor component instead. @mantine/core
package no longer exportsgetFontStyles
,getFocusStyles
andhexToRgba
functions, replace them with theme functions:theme.fn.fontStyles()
,theme.fn.focusStyles()
,theme.fn.rgba()
.- AppShell component was migrated to mobile-first approach, the way Navbar
width
is set was changed - use-idle hook options were changed to support initial state
Normalize.css and global styles on MantineProvider
MantineProvider now supports adding global styles and normalize.css with props:
Functions on theme
Mantine theme now adds several functions (full list) that can help you
write styles in createStyles
function, styles
and sx
props:
Custom properties on theme
You can now add any amount of custom properties on Mantine theme using other
key:
Mobile first approach
All layout components now support mobile first approach:
- SimpleGrid component now supports
minWidth
breakpoints (cols
prop is no longer required):
- AppShell component was migrated to use mobile first approach (breaking change) – you will need to change how Navbar width is set:
New @mantine/modals package
New @mantine/modals package is similar to @mantine/notification but for modals. It includes modals manager that allows you to:
- create shared modals context storage
- show confirm modals
- handle multiple modals layers
New components and hooks
New Stepper component:
New TransferList component:
With new use-os hook you can detect user os:
New use-set-state lets you work with state like in class components:
New features
DatePicker component now supports free input:
DatePicker, DateRangePicker, Calendar and RangeCalendar components now support multiple months rendering:
MultiSelect component now supports limiting maximum selected values:
PasswordInput component now supports visibility toggle icon changing:
Other changes
- 3 new guides were added: RTL Support, sx prop and Responsive styles
- All date picking components from @mantine/dates package now support first day of week customization (either sunday or monday)
- Tabs component pills variant was redesigned to be more neutral
- Button and ActionIcon component now have hover effects
- SegmentedControl component is now a generic – it accepts values as single type argument
- Autocomplete, Select and MultiSelect dropdowns are now rendered with popper.js. This means that dropdown element is now aware of its position on screen and will change placement based on container scroll position. You should also experience less issues with z-index configuration.
- Col component now supports responsive offset props:
offsetXs={5}
,offsetMd={10}
, etc. - NumberInput component now supports empty value
- You can now set default date format on MantineProvider, it will be used to format DatePicker and DateRangePicker inputs values
- Checkbox component now supports default icons replacement
- use-list-state hook now supports
pop
andshift
handlers - use-idle hook now supports setting initial state
- use-merged-ref hook now exports
mergeRefs
function, it supports refs merging for dynamic lists - use-focus-return hook now includes an option to disable automatic focus return and returns a function that can be used to return focus
- use-move hook now supports
onScrubStart
andonScrubEnd
callbacks