9.x → 10.x migration guide

Migrate with LLM agents

LLM agents can perform the migration for you. Copy the link to the md version of this page and ask your AI agent to apply it: it includes all breaking changes and migration steps.

Migrate with LLM

Release notes

This guide covers only breaking changes. New features and improvements are listed in the 10.0 changelog:

View 10.0 release notes

Prerequisites

Mantine 10.x requires React 19.2 or later. The new colors require Chrome and Edge 111, Safari 16.2 or Firefox 113 and later. To support older browsers, use the v9 opt-out or a PostCSS plugin that converts oklch values.

Update dependencies

Update all @mantine/* packages to version 9.8.2. If you use @mantine/charts, update recharts to 3.11.0 or later.

Changes to review by human

This section is meant for human review. Compare each demo with your application and decide whether to keep the new look or restore the previous one. Everything that can be migrated mechanically is in Changes for automated migration.

New OKLCH default palettes

Default colors were regenerated in the OKLCH color space. Color names and the number of shades are the same, color values are different. Review custom colors that were picked to match the old defaults. If you cannot migrate now, use the v9 opt-out.

The default dark primaryShade is now 7 instead of 8. To keep the 9.x shade, set primaryShade: { light: 6, dark: 8 } in the theme.

--mantine-color-* CSS variables now contain oklch() strings. Update code that parses them as hex or passes them to APIs without oklch support, for example canvas.

autoContrast is enabled by default

Check filled components with light backgrounds: their text may now be black instead of white. To restore the 9.x behavior, disable autoContrast in your theme:

import { createTheme } from '@mantine/core';

const theme = createTheme({
  autoContrast: false,
});

Darker dark theme

The dark color scheme is darker than in 9.x: the page is dark-8 and panels are dark-7. If your styles use dark-N backgrounds, shift the index by one or use the semantic variables below.

Focus rings use the --mantine-color-focus-ring variable instead of the primary color. If you override the focus ring color, override this variable.

Inputs, checkboxes, radios, Dropzone and RichTextEditor use the page color as background instead of the panel color. To keep the 9.x input background, set the input surface:

import { createTheme } from '@mantine/core';

const theme = createTheme({
  surfaces: {
    dark: {
      input: 'var(--mantine-color-surface-panel)',
    },
  },
});

New semantic color variables

Components use semantic variables such as --mantine-color-border instead of gray-N and dark-N shades. Palette overrides keep working. To change the colors of all components at once, override the semantic variables, see the colors guide:

[data-mantine-color-scheme='light'] {
  --mantine-color-border: #d0d0d0;
  --mantine-color-border-subtle: #e8e8e8;
}

[data-mantine-color-scheme='dark'] {
  --mantine-color-border: #404040;
  --mantine-color-border-subtle: #333;
}

Paper is deprecated, use Surface

Replace Paper with Surface, it supports the same props. Paper will be removed in 11.0. In dark color scheme nested surfaces step up one level per nesting, set autoDepth={false} on the nested Surface to keep the Paper look:

Level 0 – surface-page

Level 1 – surface-panel

Level 2 – surface-panel-2

import { Surface, Text } from '@mantine/core';

function Demo() {
  return (
    <Surface p="md" radius="md" withBorder>
      <Text size="sm">Level 0 – surface-page</Text>
      <Surface p="md" radius="md" mt="md" withBorder>
        <Text size="sm">Level 1 – surface-panel</Text>
        <Surface p="md" radius="md" mt="md" withBorder>
          <Text size="sm">Level 2 – surface-panel-2</Text>
        </Surface>
      </Surface>
    </Surface>
  );
}

Disabled state

Disabled components keep their colors and are displayed with reduced opacity instead of turning gray. The v9 opt-out does not restore the gray styles:

Disabled opacity
import { MantineProvider, Button, Checkbox, Switch, TextInput } from '@mantine/core';

function Demo() {
  return (
    <MantineProvider theme={{ disabledOpacity: undefined }}>
      <Button disabled>Disabled button</Button>
      <TextInput mt="md" label="Disabled input" placeholder="Disabled input" disabled />
      <Checkbox mt="md" label="Disabled checkbox" defaultChecked disabled />
      <Switch mt="md" label="Disabled switch" defaultChecked disabled />
    </MantineProvider>
  );
}

Set theme.disabledOpacity to change the opacity:

import { createTheme } from '@mantine/core';

const theme = createTheme({
  disabledOpacity: 0.4,
});

Replace the --mantine-color-disabled-* variables and the disabledBody, disabledText and disabledBorder keys of vars.colors in @mantine/vanilla-extract with the opacity variable:

.custom-control:disabled {
  opacity: var(--mantine-disabled-opacity);
}

Blockquote look

Blockquote no longer has a background and rounded corners, the icon is displayed above the quote and is smaller:

Life is like an npm install – you never know what you are going to get.– Forrest Gump
Color
Icon size
import { Blockquote } from '@mantine/core';
import { InfoIcon } from '@phosphor-icons/react';

function Demo() {
  const icon = <InfoIcon />;
  return (
    <Blockquote color="blue" cite="– Forrest Gump" icon={icon}>
      Life is like an npm install – you never know what you are going to get.
    </Blockquote>
  );
}

The radius prop and the --bq-bg-light, --bq-bg-dark and --bq-radius variables were removed. To restore the previous look, style the root element:

import { Blockquote } from '@mantine/core';

function Demo() {
  return (
    <Blockquote
      styles={{
        root: {
          backgroundColor: 'var(--mantine-color-blue-light)',
          borderRadius: 'var(--mantine-radius-md)',
        },
      }}
    >
      Life is like an npm install – you never know what you are going to get.
    </Blockquote>
  );
}

Slider thumb

Slider and RangeSlider thumb is white with a colored border, and its size depends on the size prop. Set variant="filled" to fill the thumb with the slider color and thumbSize to restore the previous size. Check custom thumb styles:

Color
Size
import { RangeSlider, Slider, Stack } from '@mantine/core';

function Demo() {
  return (
    <Stack gap="xl">
      <Slider defaultValue={40} color="blue" />
      <RangeSlider defaultValue={[20, 60]} color="blue" />
    </Stack>
  );
}

ColorPicker swatches

ColorPicker and ColorInput display 10 swatches per row instead of 7 and follow theme.defaultRadius. Set swatchesPerRow={7} and radius to restore the previous layout:

import { ColorPicker } from '@mantine/core';

function Demo() {
  return (
    <ColorPicker
      format="hex"
      swatches={['#2e2e2e', '#868e96', '#fa5252', '#e64980', '#be4bdb', '#7950f2', '#4c6ef5', '#228be6', '#15aabf', '#12b886', '#40c057', '#82c91e', '#fab005', '#fd7e14']}
    />
  );
}

Calendars have 6 weeks in every month

Every month has 6 weeks in all calendar components, so the calendar height does not change between months. Set consistentWeeks: false in DatesProvider settings to restore the previous behavior:

consistentWeeks: true (default)
MoTuWeThFrSaSu
consistentWeeks: false
MoTuWeThFrSaSu
import { Code, Group, Stack } from '@mantine/core';
import { DatePicker, DatesProvider } from '@mantine/dates';

function Demo() {
  return (
    <Group justify="center" align="flex-start" gap="xl">
      <Stack align="center" gap="xs">
        <Code>consistentWeeks: true (default)</Code>
        <DatePicker defaultDate="2026-02-01" />
      </Stack>

      <Stack align="center" gap="xs">
        <Code>consistentWeeks: false</Code>
        <DatesProvider settings={{ consistentWeeks: false }}>
          <DatePicker defaultDate="2026-02-01" />
        </DatesProvider>
      </Stack>
    </Group>
  );
}

DateTimePicker submit button

DateTimePicker and InlineDateTimePicker submit button is a default variant Button with a text label instead of a filled icon button. Set submitButtonLabel on the component or in DatesProvider settings to change the label, and submitButtonProps to change the variant:

import { DateTimePicker } from '@mantine/dates';

function Demo() {
  return <DateTimePicker label="Pick date and time" placeholder="Pick date and time" />;
}

Other layout changes

  • Grid.Col without span spans all columns of the grid instead of 12. Set span={12} to keep the old width in grids with a custom columns value.
  • DataList labelWidth sets a fixed width of the label column instead of its minimum width, so long labels wrap. If your labels now wrap, increase labelWidth.

Picker inputs open in a drawer on mobile

Picker inputs and DateTimePicker open in a bottom drawer on small screens, and onChange is called only when the user presses the submit button in the drawer. The first input in the demo opens the drawer on every screen size:

import { Stack } from '@mantine/core';
import { DatePickerInput } from '@mantine/dates';

function Demo() {
  return (
    <Stack>
      <DatePickerInput dropdownType="drawer" label="Drawer" placeholder="Pick date" />
      <DatePickerInput dropdownType="modal" label="Modal" placeholder="Pick date" />
      <DatePickerInput dropdownType="popover" label="Popover" placeholder="Pick date" />
      <DatePickerInput
        dropdownType={{ base: 'drawer', 600: 'popover' }}
        label="Drawer below 600px, popover above"
        placeholder="Pick date"
      />
    </Stack>
  );
}

Set dropdownType="popover" to keep the popover on all screens and applyOnSubmit={false} to call onChange on selection. Both props can be set for all components in the theme:

import { createTheme } from '@mantine/core';
import { DatePickerInput, DateTimePicker } from '@mantine/dates';

const theme = createTheme({
  components: {
    DatePickerInput: DatePickerInput.extend({
      defaultProps: { dropdownType: 'popover' },
    }),
    DateTimePicker: DateTimePicker.extend({
      defaultProps: { applyOnSubmit: false },
    }),
  },
});

Drawer swipe to dismiss

Drawer is closed with a swipe gesture by default. Set the data-drawer-no-swipe attribute on draggable elements inside the drawer to keep the gesture away from them:

import { useDisclosure } from '@mantine/hooks';
import { Drawer, Button, Text } from '@mantine/core';

function Demo() {
  const [opened, { open, close }] = useDisclosure(false);

  return (
    <>
      <Drawer
        opened={opened}
        onClose={close}
        position="bottom"
        title="Swipe to dismiss"
        withCloseButton={false}
        withHandle
      >
        <Text>Drag the handle or swipe the drawer down to close it.</Text>
      </Drawer>

      <Button variant="default" onClick={open}>
        Open Drawer
      </Button>
    </>
  );
}

To disable the gesture, set withSwipe={false} on Drawer or in the theme:

import { createTheme, Drawer } from '@mantine/core';

const theme = createTheme({
  components: {
    Drawer: Drawer.extend({
      defaultProps: { withSwipe: false },
    }),
  },
});

Tooltip opens on focus

Tooltip opens when the target receives keyboard focus, press Tab to focus the button in the demo. To restore the previous behavior, set events={{ hover: true, focus: false, touch: false }}:

import { Tooltip, Button } from '@mantine/core';

function Demo() {
  return (
    <Tooltip label="Tooltip">
      <Button>Button with tooltip</Button>
    </Tooltip>
  );
}

Uncontrolled form mode is the default

useForm and useField are uncontrolled by default: the form component does not rerender when the user types. The automated migration replaces form.values, form.isDirty() and form.isTouched() reads during render with hooks. To keep the 9.x behavior instead, set mode: 'controlled' in every useForm call:

const form = useForm({ mode: 'controlled', initialValues: { name: '' } });

See form modes for the differences between the two modes.

MaskInput stores raw values

MaskInput value and onChange work with the raw value without the mask. If your application stores masked values, for example (123) 456-7890, convert them with unformatMask when loading or migrate the stored data:

import { MaskInput } from '@mantine/core';

// 9.x, value is "(123) 456-7890"
<MaskInput mask="(999) 999-9999" onChange={(event) => setValue(event.currentTarget.value)} />

// 10.x, value is "1234567890"
<MaskInput mask="(999) 999-9999" value={value} onChange={setValue} />

v9 opt-out

If your application cannot be migrated now, restore 9.x colors with v9Theme and v9CssVariablesResolver. Both will be removed in 11.0:

import {
  MantineProvider,
  v9Theme,
  v9CssVariablesResolver,
} from '@mantine/core';

function App() {
  return (
    <MantineProvider
      theme={v9Theme}
      cssVariablesResolver={v9CssVariablesResolver}
    >
      {/* Your app */}
    </MantineProvider>
  );
}

Nested popover dismissal

Remove withinPortal={false} if you used it only to keep a parent popover open. Keep it if the dropdown should render next to its target in the DOM. Escape now dismisses the inner dropdown first. Set escapeKeyBubbles on the inner popover to dismiss its ancestors too.

To restore 9.x dismissal throughout your application, set dismissMode in your theme:

import { createTheme, Popover } from '@mantine/core';

const theme = createTheme({
  components: {
    Popover: Popover.extend({ defaultProps: { dismissMode: 'legacy' } }),
  },
});

Changes for automated migration

This part is written for coding agents. Each entry names the 9.x usage to search for and the replacement. Apply every entry that matches the codebase, run the type checker and tests afterwards, and report behavior changes from this list that cannot be resolved by a code change.

Stepper.Step step, state, allowStepClick and onClick props

Remove step, state, allowStepClick and onClick props from Stepper.Step elements. Stepper ignored them in 9.x and applies them in 10.x, so a step with step={5} displays 6 as its icon and ignores the active prop. Keep them only on steps that intentionally do not follow the active prop of Stepper.

Timeline data-opposite attribute

Timeline no longer sets data-opposite on the root element. Replace selectors that target it:

/* 9.x */
.timeline[data-opposite] {
  /* ... */
}

/* 10.x */
.timeline:has(.mantine-Timeline-itemOpposite) {
  /* ... */
}

Controller hook types renamed

Rename the imported types of useTimer, useEditable and useImageCropper hooks. The useHook.Options and useHook.ReturnValue namespace types were removed as well, replace them with the same types:

9.x10.x
UseTimerOptionsTimerControllerOptions
UseTimerReturnValueTimerController
UseEditableOptionsEditableControllerOptions
UseEditableReturnValueEditableController
UseImageCropperOptionsImageCropperControllerOptions
UseImageCropperReturnValueImageCropperController

Controller hooks return a memoized object

useTimer, useEditable, useImageCropper and usePagination return the same object until the state changes. Replace useEffect dependencies on the returned object with the state values the effect reads:

const controller = useTimer();

// 9.x, ran on every render
useEffect(() => {
  /* ... */
}, [controller]);

// 10.x
const running = controller.isRunning();

useEffect(() => {
  /* ... */
}, [running]);

Tree store prop

Rename the tree prop of Tree to store, the tree field of the renderNode payload to store, and the TreeController type to TreeStore:

// 9.x
const tree = useTree();
<Tree data={data} tree={tree} renderNode={({ node, tree }) => <div onClick={() => tree.toggleExpanded(node.value)}>{node.label}</div>} />;

// 10.x
const store = useTree();
<Tree data={data} store={store} renderNode={({ node, store }) => <div onClick={() => store.toggleExpanded(node.value)}>{node.label}</div>} />;

Combobox store listId and selectedOptionIndex

Replace combobox.listId with combobox.getListId() and combobox.selectedOptionIndex with combobox.getSelectedOptionIndex(). useVirtualizedCombobox still accepts the selectedOptionIndex option.

comboboxProps.store in Select, MultiSelect, TagsInput and Autocomplete

store passed in comboboxProps is ignored. Create the store with the component hook and pass it to the store prop. The hook returns all useCombobox actions:

// 9.x
const combobox = useCombobox();
<MultiSelect data={data} comboboxProps={{ store: combobox }} />;

// 10.x
const store = useMultiSelect();
<MultiSelect data={data} store={store} />;

Combobox.Target role and aria-expanded

Combobox.Target sets role="combobox" and aria-expanded on the target element by default. Tests that query the target with getByRole('textbox') must query getByRole('combobox') instead. Set withExpandedAttribute={false} on Combobox.Target to restore the 9.x markup.

Combobox limit counts options across groups

In Select, MultiSelect, Autocomplete and TagsInput with grouped data, limit now counts options across all groups. In 9.x, every group counted towards the limit as one item. Reduce limit if the dropdown displays more options than expected.

Pagination root element

Pagination root element is a nav landmark. Remove nav wrappers around Pagination to avoid nested landmarks. Tests that query role="navigation" now match the pagination root.

NavLink with nested links

NavLink with children and without href is rendered as a button instead of an a element. Update tests and styles that select the parent link by tag. Set component="a" to keep the 9.x element.

Portal shared node

Portal ignores className, style and id when the shared portal node or target is used. To keep these props, set reuseTargetNode={false} on that Portal.

Modal and Drawer returnFocus without trapFocus

Modal and Drawer return focus to the previously focused element on close even with trapFocus={false}. Set returnFocus={false} where focus must stay where it is.

ModalBase components removed

Replace ModalBase* components with Modal or Drawer compound components:

9.x10.x
ModalBaseModal.Root or Drawer.Root
ModalBaseOverlayModal.Overlay or Drawer.Overlay
ModalBaseContentModal.Content or Drawer.Content
ModalBaseHeaderModal.Header or Drawer.Header
ModalBaseTitleModal.Title or Drawer.Title
ModalBaseCloseButtonModal.CloseButton or Drawer.CloseButton
ModalBaseBodyModal.Body or Drawer.Body
scrollAreaComponent={NativeScrollArea}Remove the prop, content is rendered without a scroll wrapper by default
// 9.x
import {
  ModalBase,
  ModalBaseBody,
  ModalBaseCloseButton,
  ModalBaseContent,
  ModalBaseHeader,
  ModalBaseOverlay,
  ModalBaseTitle,
} from '@mantine/core';

function Demo() {
  return (
    <ModalBase opened={opened} onClose={close}>
      <ModalBaseOverlay />
      <ModalBaseContent>
        <ModalBaseHeader>
          <ModalBaseTitle>Title</ModalBaseTitle>
          <ModalBaseCloseButton />
        </ModalBaseHeader>
        <ModalBaseBody>Content</ModalBaseBody>
      </ModalBaseContent>
    </ModalBase>
  );
}

// 10.x
import { Modal } from '@mantine/core';

function Demo() {
  return (
    <Modal.Root opened={opened} onClose={close}>
      <Modal.Overlay />
      <Modal.Content>
        <Modal.Header>
          <Modal.Title>Title</Modal.Title>
          <Modal.CloseButton />
        </Modal.Header>
        <Modal.Body>Content</Modal.Body>
      </Modal.Content>
    </Modal.Root>
  );
}

Spotlight store registerAction and empty

registerAction function and the empty field of the Spotlight store were removed. Remove calls to registerAction and reads of empty. Spotlight renders Spotlight.Empty with the nothingFound content itself when no actions match the query.

RichTextEditor edit-link event

RichTextEditor.Link control listens to the edit-link event on the editor instead of window. Replace window.dispatchEvent(new CustomEvent('edit-link')) with (editor as any).emit('edit-link'), the event is not part of the tiptap EditorEvents type.

useMask and MaskInput separate option

Remove the separate option from useMask and the separate prop from MaskInput, they no longer exist.

MaskInput value format

MaskInput value, defaultValue and onChange work with the raw value without the mask, and onChange receives a string instead of an event. Replace event.currentTarget.value reads in onChange handlers with the string argument. Masked strings are no longer parsed: value, defaultValue and use-form values (initialValues, form.setFieldValue, form.reset) must be raw. Convert stored masked values with unformatMask. useMask setValue accepts a raw value as well. Use onChangeRaw to read the masked value.

beforeMaskedStateChange removed

Remove the beforeMaskedStateChange option from useMask and the prop from MaskInput. It was never called. The MaskState type is no longer exported, remove its imports.

PinInput value with empty inputs

An empty PinInput input is a space in the value, so clearing one input no longer shifts the others. Replace value.length checks that detect a complete value with isComplete() from usePinInput or a regex:

// 9.x, first input cleared: '23456'
// 10.x: ' 23456'
const isFilled = /^\d{6}$/.test(value);

TimeInput data-empty attribute

TimeInput sets data-empty on the input element while it has no value. Rename a custom data-empty attribute passed to TimeInput.

RollingNumber root element

RollingNumber renders a span root element instead of a div. Change ref types from HTMLDivElement to HTMLSpanElement.

Cascader data-active attribute

Rename [data-active] selectors on Cascader column options to [data-current]. In tests, aria-selected on column options marks the selected value, not the option highlighted with the keyboard. Query [data-current] to find the highlighted option.

Picker inputs calendar theme defaults

defaultLevel and defaultDate set in theme defaultProps of Calendar or a picker component no longer apply to the dropdown of picker inputs. Add them to the defaultProps of the picker input:

import { createTheme } from '@mantine/core';
import { DatePickerInput } from '@mantine/dates';

const theme = createTheme({
  components: {
    DatePickerInput: DatePickerInput.extend({
      defaultProps: { defaultLevel: 'year' },
    }),
  },
});

Picker inputs popoverProps.opened

popoverProps.opened on picker inputs and DateTimePicker requires popoverProps.onChange. It is called on every open and close, and the input cannot open its dropdown without it:

import { useState } from 'react';
import { DatePickerInput } from '@mantine/dates';

function Demo() {
  const [opened, setOpened] = useState(false);
  return <DatePickerInput popoverProps={{ opened, onChange: setOpened }} />;
}

With the controller prop, pass dropdownOpened and onDropdownOpenedChange to the controller hook instead, popoverProps.opened is ignored.

DateTimePicker submitButtonProps

The submit button of DateTimePicker and InlineDateTimePicker is a Button instead of an ActionIcon. Remove ActionIcon specific props from submitButtonProps, for example size="input-sm".

DatesProvider consistentWeeks

consistentWeeks is true by default. Remove consistentWeeks: true from DatesProvider settings.

useMatches options argument

Remove the second argument of useMatches. The hook always returns the base value on the server and during hydration:

// 9.x
const value = useMatches({ base: 'a', sm: 'b' }, { getInitialValueInEffect: false });

// 10.x
const value = useMatches({ base: 'a', sm: 'b' });

useScroller dragHandlers

dragHandlers returned from useScroller contains only onMouseDown. If the handlers are passed one by one, keep onMouseDown and remove onMouseMove, onMouseUp and onMouseLeave. Spreading {...dragHandlers} works as before. The hook no longer sets the cursor on the container, use the isDragging value to set it.

useClickOutside handler event

The useClickOutside handler receives a FocusEvent when the user clicks inside an iframe. If the handler argument is typed as MouseEvent | TouchEvent, add FocusEvent to the type:

useClickOutside((event: MouseEvent | TouchEvent | FocusEvent) => console.log(event.type));

SunburstChart endAngle

SunburstChart endAngle is the angle at which the chart ends, as in PieChart. In 9.x the chart ended at startAngle + endAngle. If both props are set, pass the sum as endAngle. Setting only startAngle still draws a full circle:

// 9.x
<SunburstChart data={data} startAngle={90} endAngle={180} />

// 10.x
<SunburstChart data={data} startAngle={90} endAngle={270} />

Move startAngle, endAngle and innerRadius from sunburstChartProps to the component props. textOptions in sunburstChartProps is ignored because labels are drawn by Mantine.

@mantine/schedule changes

  • isAfterMinDate and isBeforeMaxDate are no longer exported. Compare dates with dayjs instead.
  • ScheduleHeader.varsResolver and the ScheduleHeaderCssVariables type are removed. The header has no CSS variables.
  • The data-all-day-dragging attribute is removed from WeekView. Use data-event-interaction to style the view while an event is dragged.
  • WeekView and ResourcesWeekView weekLabelFormat defaults to MMM D instead of MMM DD. Set weekLabelFormat="MMM DD" to keep zero-padded days.
  • MobileMonthView calls onDateChange when a day is selected. If date is controlled, update it in onDateChange.
  • WeekView highlights today by default, like the other views. Set highlightToday={false} to turn it off.

form.key removed

Remove key={form.key('path')} from inputs. In lists, use a stable key stored in the list item, for example a randomId(), not the field path. useField no longer returns key, remove key={field.key} the same way. The Key type is no longer exported, remove its imports:

// 9.x
<TextInput key={form.key('name')} {...form.getInputProps('name')} />

// 10.x
<TextInput {...form.getInputProps('name')} />

Form values read during render

In uncontrolled mode the component that calls useForm does not rerender when values change. Replace reads during render with hooks, calls in event handlers and form.onSubmit do not change:

9.x10.x
form.values.pathform.useWatchValue('path')
form.getValues().pathform.useWatchValue('path')
form.isDirty()form.useDirty()
form.isTouched()form.useTouched()
// 9.x
<Button disabled={!form.isDirty()}>Save</Button>

// 10.x
const dirty = form.useDirty();
<Button disabled={!dirty}>Save</Button>

If the application keeps the 9.x behavior with mode: 'controlled', skip this entry.

Uncontrolled form inputs receive value

In uncontrolled mode getInputProps returns value and checked instead of defaultValue and defaultChecked. Change custom inputs and enhanceGetInputProps functions that read defaultValue to read value. Add an initial value for every field rendered with an input, otherwise React warns about an input switching from uncontrolled to controlled.

If a custom input keeps state that value cannot express, for example a partially entered date, clear it with the use-form-field hook when the form writes the value.

Form values are not cloned on every change

The object returned from form.getValues() and form.values is no longer a copy. Replace mutations of it with form.setFieldValue or form.setValues.

form.setValues clears only errors of changed fields

form.setValues clears errors only of the fields it sets. Where all errors must disappear, for example after a failed submit, call form.clearErrors() before it:

// 9.x
form.setValues(data);

// 10.x
form.clearErrors();
form.setValues(data);

UseFieldReturnType type parameters

Remove the third type argument of UseFieldReturnType: UseFieldReturnType<string, 'input', 'uncontrolled'> becomes UseFieldReturnType<string, 'input'>.

Removed @mantine/form types

Replace imports of ClearFieldDirty, SetFieldTouched, SetFieldDirty and SetCalculatedFieldDirty with indexed form types, for example UseFormReturnType<Values>['setTouched'].