apps/mantine.dev/src/pages/changelog/7-7-0.mdx
import { AreaChartDemos, FloatingIndicatorDemos, ScatterChartDemos, ThemingDemos, UseMutationObserverDemos, UseStateHistoryDemos } from '@docs/demos'; import { Layout } from '@/layout'; import { MDX_DATA } from '@/mdx';
export default Layout(MDX_DATA.Changelog770);
Virtual color is a special color which values should be different for light and dark color schemes.
To define a virtual color, use virtualColor function which accepts an object with the following
properties as a single argument:
name – color name, must be the same as the key in theme.colors objectlight – a key of theme.colors object for light color schemedark – a key of theme.colors object for dark color schemeTo see the demo in action, switch between light and dark color schemes (Ctrl + J):
New FloatingIndicator component:
<Demo data={FloatingIndicatorDemos.direction} />New ScatterChart component:
<Demo data={ScatterChartDemos.usage} />New colorsTuple function can be used to:
import { colorsTuple, createTheme } from '@mantine/core';
const theme = createTheme({
colors: {
custom: colorsTuple('#FFC0CB'),
dynamic: colorsTuple(
Array.from({ length: 10 }, (_, index) => '#FFC0CB')
),
},
});
New useMutationObserver hook:
<Demo data={UseMutationObserverDemos.target} />New useStateHistory hook:
<Demo data={UseStateHistoryDemos.usage} />AreaChart, BarChart and LineChart
components now support xAxisLabel and yAxisLabel props:
mantine-hidden-from-{x} and mantine-visible-from-{x} classes.window.HTMLElement.prototype.scrollIntoViewNew articles added to the help center:
transform: scale().connectNulls and areaProps propsscrollAreaProps prop to pass props down to the ScrollArea component in the dropdownfade-up, fade-down, fade-left, fade-rightfade-down. This change resolves issues with SegmentedControl indicator positioning when used inside modals.fz and lh style props with h1, h2, h3, h4, h5, h6 values