smaller-than and larger-than mixins
smaller-than
and larger-than
mixins can be used to create styles that will be applied only when the screen is smaller or larger than specified breakpoint.
Note that to use these mixins, you need to update postcss-preset-mantine to version 1.11.0
or higher.
Will be transformed to:
You can also use smaller-than
and larger-than
mixins with mantine breakpoints:
Form schema resolvers packages
@mantine/form
schema validation resolver packages are now available as separate packages.
Moving resolvers to separate packages allows making them type-safe and fully tested.
Old resolvers are still exported from @mantine/form
package – you will be able to use them without any changes
until 8.0.0 release.
The new packages are drop-in replacements for old resolvers, they have the same API and can be used in the same way.
Example of zod resolver:
rem/em functions improvements
rem and em function now support space-separated values. This feature is available
both in rem
function exported from @mantine/core
package and postcss-preset-mantine.
Note that you need to update postcss-preset-mantine to 1.11.0
to use this feature.
All components props that are converted to rem
units now support space-separated values as well.
For example, space-separated values can be used in radius
prop of Modal component:
component and renderRoot props for non-polymorphic components
All Mantine components now support component
and renderRoot
props event if they are not polymorphic.
The difference between polymorphic and non-polymorphic components is that polymorphic components
include the full set of props of the component passed to the component
prop, while non-polymorphic
components only include props that are specific to the original component. It is done this way to
improve TypeScript performance.
Outline Checkbox and Radio variant
Checkbox and Radio components now support outline
variant:
HueSlider and AlphaSlider components
HueSlider and AlphaSlider components were added back:
Hue value: 250
Alpha value: 0.55
Button loading state animation
Button component now has loading state animation:
Drawer offset
Drawer now supports offset
prop. It changes drawer offset from the edge of the viewport:
z-index CSS variables
You can now use Mantine z-index CSS variables:
--mantine-z-index-app
– value100
--mantine-z-index-modal
– value200
--mantine-z-index-popover
– value300
--mantine-z-index-overlay
– value400
--mantine-z-index-max
– value9999
Example of using --mantine-z-index-modal
variable:
Improved dark color scheme colors
theme.colors.dark
colors were slightly changed to improve contrast and make it easier to read text.
You can preview new colors on this page. New colors values are:
If you prefer old colors, change theme settings on MantineProvider
:
Documentation updates
- Schema-based validation with
@mantine/form
now has a dedicated page. It includes more examples for basic, nested and list fields validation for each resolver. - Autocomplete, Select, MultiSelect and TagsInput now include new demos that show how to customize dropdown behavior and styles.
- Example of using Mantine with disabled JavaScript was added to the color schemes guide.
- Pagination now includes an additional example with chunked content handling.
- A new section about dayjs localization with Next.js app router and server components has been added to the dates getting started page
- Modals manager now includes a guide on how to pass props down to the underlying Modal component.
- Slider now has sections about decimal values and
minRange
prop. - You can now view all 200+ releases with release dates on the all releases page.
Other changes
- use-hash hook now supports
getInitialValueInEffect: false
option to get initial value during state initialization. - New
useMantineColorScheme({ keepTransitions: true })
option allows keeping transitions when color scheme changes. Note that it isfalse
by default. - All templates were migrated to yarn v4 – this change significantly improves installation speed.
- TypographyStylesProvider now has styles for
<kbd />
element. - MultiSelect and TagsInput components now support
hiddenValuesDivider
prop. It allows customizing divider character between values invalue
prop of the hidden input. - Grid component now supports
overflow
prop, which allows controllingoverflow
CSS property on the root element. It ishidden
by default. - Modal and Drawer components now support
removeScrollProps
prop. It allows configuring react-remove-scroll. - AppShell now supports
offsetScrollbars
prop. It determines whether scrollbars should be offset, it istrue
by default. The logic of scrollbars offset is controlled by react-remove-scroll. - Menu now supports
trigger="click-hover"
prop, to open menu both on click and on hover. - It is now possible to set
keepMounted
prop on Tabs.Panel components individually, not only onTabs
component. - mantine-flagpack has been migrated to support
7.x
versions of@mantine/core
. To use it, updatemantine-flagpack
to4.0.0
. - vite-template was migrated from Jest to Vitest.
- The main Mantine repository was migrated to yarn v4. The process of getting started locally was changed
@mantine/ds
package has been deprecated. You can use@mantinex/mantine-logo
package to useMantineLogo
component in your project.