Support Mantine development
You can now sponsor Mantine development with OpenCollective. All funds are used to improve Mantine and create new features and components.
Sponsor Mantineuse-radial-move hook
New use-radial-move hook can be used to create custom radial sliders:
BarChart color based on value
BarChart component now supports getBarColor prop to assign color based on value.
getBarColor function is called with two arguments: value and series object. It should return a color
string (theme color reference or any valid CSS color value).
Button.GroupSection and ActionIcon.GroupSection
ActionIcon.GroupSection and Button.GroupSection are new components that
can be used in ActionIcon.Group/Button.Group to create sections that are
not ActionIcon/Button components:
Table vertical variant
Table component now support variant="vertical":
| Epic name | 7.x migration |
|---|---|
| Status | Open |
| Total issues | 135 |
| Total story points | 874 |
| Last updated at | September 26, 2024 17:41:26 |
Table tabular numbers
Table component now supports tabularNums prop to render numbers in tabular style. It sets
font-variant-numeric: tabular-nums which makes numbers to have equal width.
This is useful when you have columns with numbers and you want them to be aligned:
| Product | Units sold |
|---|---|
| Apples | 2,214,411,234 |
| Oranges | 9,983,812,411 |
| Bananas | 1,234,567,890 |
| Pineapples | 9,948,810,000 |
| Pears | 9,933,771,111 |
Update function in modals manager
Modals manager now supports modals.updateModal and modals.updateContextModal
function to update modal after it was opened:
useForm submitting state
use-form hook now supports form.submitting field
and form.setSubmitting function to track form submission state.
form.submitting field will be set to true if function passed to
form.onSubmit returns a promise. After the promise is resolved or rejected,
form.submitting will be set to false:
You can also manually set form.submitting to true or false:
useForm onSubmitPreventDefault option
use-form hook now supports onSubmitPreventDefault option.
This option is useful if you want to integrate useForm hook with server actions.
By default, event.preventDefault() is called on the form onSubmit handler.
If you want to change this behavior, you can pass onSubmitPreventDefault option
to useForm hook. It can have the following values:
always(default) - always callevent.preventDefault()never- never callevent.preventDefault()validation-failed- callevent.preventDefault()only if validation failed
Subtle RichTextEditor variant
RichTextEditor component now supports subtle variant:
onExitTransitionEnd and onEnterTransitionEnd
Modal and Drawer components now support onExitTransitionEnd and onEnterTransitionEnd props,
which can be used to run code after exit/enter transition is finished. For example, this is useful when you want to clear
data after modal is closed:
Week numbers in DatePicker
DatePicker and other components based on Calendar component now support withWeekNumbers prop to display week numbers:
| # | Mo | Tu | We | Th | Fr | Sa | Su |
|---|---|---|---|---|---|---|---|
| 40 | |||||||
| 41 | |||||||
| 42 | |||||||
| 43 | |||||||
| 44 |
New demo: BarChart with overlay
Variants types augmentation
Custom variants types augmentation guide was added to the documentation.
Example of adding custom variant type to Button component:
Help Center updates
- How to use Mantine template on GitHub? and How can I submit a template to Mantine documentation? pages were moved from the documentation to Help Center
- How that thing is done on mantine.dev website? question
- Why is it required to have 10 shades per color? question
- Why I see color scheme flickering on page load? question
- How can I test Modal/Drawer/Popover components? question