9.0.0-alpha.0
#8678
Replies: 3 comments 2 replies
-
|
@rtivital What do you think about making with-aligned-labels.mp4 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
can we have native support for Jalali and other calendars in v9? |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Is there still no plan to add an official datatable component? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
View changelog with demos on alpha.mantine.dev website
Alpha version
This is the first alpha version of Mantine 9. You are welcome to review changes and provide feedback.
Support Mantine development
You can now sponsor Mantine development with OpenCollective.
All funds are used to improve Mantine and create new features and components.
Migration guide
This changelog covers breaking changes and new features in Mantine 9.0.
To migrate your application to Mantine 9.0, follow 8.x → 9.x migration guide.
Peer dependencies requirements updates
Starting from Mantine 9.0, the following dependencies are required:
@mantine/*packages@mantine/tiptap(migration guide)@mantine/charts(no migration required)Namespace types exports
All Mantine components and hooks now provide namespace exports for related types.
For example, use-disclosure hook types can now be accessed like this:
Example of using namespace types with Button props type:
New @mantine/schedule package
New
@mantine/schedulepackage provides a complete set ofcalendar scheduling components for React applications. It includes multiple view levels,
drag-and-drop event management, and extensive customization options.
Components included:
Key features:
canDragEventcallback, and drag-to-select time ranges withwithDragSlotSelectdefaultmode enables all interactions (click, drag, navigation),staticmode renders a read-only calendarlayout="responsive"automatically switches toYearViewandMobileMonthViewon smaller screensrenderEventBodyorrenderEventto fully customize how events are displayed in all viewslabelsprop, locale-aware date formatting via dayjsonTimeSlotClick,onAllDaySlotClick,onDayClick, andonEventClickfor building interactive scheduling interfacesclassNames,styles, andunstyledprops, along with CSS variables for themingTo get started, follow the getting started guide.
Collapse horizontal orientation
Collapse component now supports horizontal orientation:
use-collapse and use-horizontal-collapse hooks
New
use-collapsehook is the hook version of Collapse component.It allows animation of height from
0toautoand vice versa.use-horizontal-collapseworks the same way asuse-collapsebut animates width instead of height:use-floating-window hook
New use-floating-window hook allows creating floating draggable
elements:
FloatingWindow component
FloatingWindow provides component API for use-floating-window hook:
OverflowList component
New OverflowList component displays list of items and collapses the overflowing items into a single element:
Card horizontal orientation
Card component now supports horizontal orientation:
Checkbox.Group and Switch.Group maxSelectedValues
Checkbox.Group and Switch.Group now support
maxSelectedValuesprop to limit the number of selected values.When the limit is reached, the remaining controls are disabled and cannot be selected.
Inputs loading state
All Mantine input components based on Input component now support
loadingprop.Set
loadingprop to display a loading indicator. By default, the loader is displayed on the right side of the input.You can change the position with the
loadingPositionprop to'left'or'right'. This is useful for async operations like API calls, searches, or validations:renderPill in MultiSelect and TagsInput
MultiSelect and TagsInput components now support
renderPillprop to customize pill rendering:Clear section mode
All clearable input components now support
clearSectionModeprop that determines how the clear button andrightSectionare rendered:'both'(default) – render both the clear button andrightSection'rightSection'– render only the user-suppliedrightSection, ignore clear button'clear'– render only the clear button, ignorerightSectionThis prop is supported by Select, Autocomplete,
MultiSelect, TagsInput, FileInput,
DateInput, DatePickerInput,
MonthPickerInput, YearPickerInput,
TimePicker, and DateTimePicker.
Marquee component
New Marquee component creates continuous scrolling animation for content:
Scroller component
New Scroller component displays horizontally scrollable content with navigation controls.
It supports native scrolling via trackpad, shift + mouse wheel, touch gestures, and mouse drag:
use-scroller hook
New use-scroller hook provides logic for creating custom scrollable containers with navigation controls:
use-form TransformedValues type argument
use-form now supports passing second type argument
TransformedValuesto define the type oftransformed values returned by
form.getTransformedValuesandform.onSubmit:use-form async validation
use-form validation rules can now be async – return a
Promisethat resolves to anerror message or
null. When any rule is async,form.validate(),form.validateField()andform.isValid()all return promises. Theform.validatingproperty istruewhile any asyncvalidation is in progress, and
form.isValidating(path)checks individual fields.Each rule receives an
AbortSignalas the fourth argument. The signal is aborted when a newervalidation supersedes the current one, which you can use to cancel in-flight HTTP requests.
When using async validation with
validateInputOnChange, setvalidateDebounceto avoidfiring an API call on every keystroke:
Generic components
SegmentedControl, Select, MultiSelect,
Chip.Group, Switch.Group, Checkbox.Group and Radio.Group
now support generic value type. You can pass primitive values (numbers, strings, boolean, null)
as the type argument. The generic type is used for
value,defaultValue,onChangeand other props.For example, generic type can now be used with SegmentedControl
to specify string union:
Combobox virtualization (alpha)
Combobox component now supports virtualization.
Virtualization support is currently in alpha stage and the API may change in future releases. You
are welcome to try it out and provide feedback.
Example of implementation with
useVirtualizedComboboxand react-virtuoso:Highlight per-term colors
Highlight component now supports custom colors for individual highlight terms.
You can provide an array of objects with
textandcolorproperties to assign different colorsto different highlighted terms:
Highlight whole-word matching
Highlight component now supports
wholeWordprop to match only complete words.When enabled, 'the' will not match 'there' or 'theme':
Pagination and use-pagination startValue
Pagination component and use-pagination hook now support
startValuepropto define the starting page number. For example, with
startValue={5}andtotal={15},the pagination range will be from 5 to 15:
Grid improvements
Grid component no longer uses negative margins for spacing between columns.
Instead, it now uses native CSS
gapproperty, which means you no longer need to useoverflow="hidden"to prevent content overflow caused by negative margins.Slider vertical orientation
Slider and RangeSlider components now support vertical orientation:
SimpleGrid improvements
SimpleGrid component now supports
minColWidthprop to use CSS Gridauto-fill/auto-fitto automatically adjust the number of columns based on available space and minimum column width.
When
minColWidthis set, thecolsprop is ignored. UseautoFlowprop to switch betweenauto-fill(default) andauto-fitbehavior.SimpleGrid also now supports
autoRowsprop to control the size ofimplicitly created grid rows:
BarsList component
New BarsList component displays a list of horizontal bars with names and values.
It supports custom colors, auto contrast, value formatting, and custom bar rendering:
Documentation updates
FormDatasection was added to all inputs componentssuperjsonlibraryOther changes
lightvariant in all components now uses different colors values without transparency to improve contrastmodprop now converts camelCase keys to kebab-case for data attributes in all components@mantine/formpackage no longer exports schema resolvers, use dedicated packages instead@mantine/formvalidation is now natively async –form.validate(),form.validateField()andform.isValid()return promises. Newform.validating,form.isValidating(path),validateDebounceandresolveValidationErroroptions were added.createPolymorphicComponentfunction was renamed to shorterpolymorphicfor conveniencefont-weight: 600instead offont-weight: 500for better readabilitymis- margin-inline-startmie- margin-inline-endpis- padding-inline-startpie- padding-inline-endexpandedState,selectedStateandcheckedStateprops.data-hoveredattribute for hover state, you need to apply hover styles with&:hoverinstead. This change improves rendering performance by resolving this issue.expandedprop instead ofinkeepMounted={false}prop to unmount collapsed contentonMaxValuesprop, which is called when the user attempts to select more values thanmaxValuesonMaxTagsprop, which is called when the user attempts to add more tags thanmaxTagsrefpropcolorprop, usecstyle prop insteadpositionDependenciesprop, it is no longer requiredreadOnlyandwithErrorStylespropsinitialStateprop was renamed todefaultExpandedfor consistency with other componentsshowAriaLabelandhideAriaLabelprops allow customizing ARIA labelsFormDatanameandhiddenInputPropsprops to include color value in uncontrolled form submissionswithBorderby defaultinput-prefix forsizeprop to match input and button sizesonTransitionStartandonTransitionEndcallbacksonEnter,onEntered,onExitandonExitedcallbacksgutterprop was renamed togapfor consistency with other layout components. NewrowGapandcolumnGapprops allow separate control of row and column spacing. Grid.Col now supportsalignprop for per-column vertical alignment.maxValueprop to display{maxValue}+when the label exceeds the maximum valueshowZeroprop (defaulttrue) to control visibility of indicator with label0offsetprop object withxandyproperties for separate horizontal and vertical offsetsonMinReachedandonMaxReachedcallbacksselectAllOnFocusprop to select all text when input is focusedsectionGapprop to add visual separation between sections in degreesstartAngleprop to control where the progress starts (0 = right, 90 = bottom, 180 = left, 270 = top)start,reversed, andvalueprops for enhanced semantic HTML supportindentSpacesprop to control the number of spaces used for formatting JSONallowClearprop to reset rating to 0 by clicking the same valueonLeftReachedandonRightReachedcallbacks for horizontal scroll boundarieshidden: trueproperty. Hidden marks allow snapping to specific values without displaying them visually, useful withrestrictToMarksprop.setExpandedState,setSelectedState, andsetCheckedStatefunctionsuseFullscreenElementanduseFullscreenDocumentuse-mouse(for ref) anduse-mouse-position(for document).useMutationObserverTargethook was added for observing external target elements.sethandleronTransitionStartandonTransitionEndcallbacks@mantine/hookstypes were renamed for consistency:UseScrollSpyReturnType→UseScrollSpyReturnValueStateHistory→UseStateHistoryValueOS→UseOSReturnValueThis discussion was created from the release 9.0.0-alpha.0.
Beta Was this translation helpful? Give feedback.
All reactions