apps/mantine.dev/src/pages/changelog/7-5-0.mdx
import { AreaChartDemos, DatePickerInputDemos, DatesProviderDemos, DonutChartDemos, PieChartDemos, TitleDemos, } from '@docs/demos'; import { Layout } from '@/layout'; import { MDX_DATA } from '@/mdx';
export default Layout(MDX_DATA.Changelog750);
New DonutChart component:
<Demo data={DonutChartDemos.usage} />New PieChart component:
<Demo data={PieChartDemos.usage} />DatePickerInput, MonthPickerInput and
YearPickerInput now support valueFormatter prop.
valueFormatter is a more powerful alternative to valueFormat prop.
It allows formatting value label with a custom function.
The function is the same for all component types (default, multiple and range)
– you need to perform additional checks inside the function to handle different types.
Example of using a custom formatter function with type="multiple":
You can now force each month to have 6 weeks by setting consistentWeeks: true on
DatesProvider. This is useful if you want to avoid layout
shifts when month changes.
It is now possible to change series labels with label property
in series object. This feature is supported in AreaChart,
BarChart and LineChart components.
All @mantine/charts components now support valueFormatter prop, which allows
formatting value that is displayed on the y axis and inside the tooltip.
New Title textWrap prop sets text-wrap
CSS property. It controls how text inside an element is wrapped.
You can also set textWrap on theme:
import { createTheme, MantineProvider, Title } from '@mantine/core';
const theme = createTheme({
headings: {
textWrap: 'wrap',
},
});
function Demo() {
return (
<MantineProvider theme={theme}>
<Title>Some very long title that should wrap</Title>
</MantineProvider>
);
}
If set on theme, textWrap is also applied to headings in Typography
All components now support mod prop, which allows adding data attributes to
the root element:
import { Box } from '@mantine/core';
<Box mod="data-button" />;
// -> <div data-button />
<Box mod={{ opened: true }} />;
// -> <div data-opened />
<Box mod={{ opened: false }} />;
// -> <div />
<Box mod={['button', { opened: true }]} />;
// -> <div data-button data-opened />
<Box mod={{ orientation: 'horizontal' }} />;
// -> <div data-orientation="horizontal" />
shift and flip middlewares documentationNew articles added to the help center:
readOnly proploading state animationwithItemsBorder prop which allows removing border between itemstransitionDuration prop which controls section width animation durationresize prop, which allows setting resize CSS property on the input@mantine/hooks package now exports readLocalStorageValue and readSessionStorageValue function to get value from storage outside of React components