@mui/base
Advanced tools
Changelog
@mui/base@5.0.0-alpha.121
Changelog
@mui/base@5.0.0-alpha.120
<!-- 27 -->[Select][base] Add the multiselect functionality to SelectUnstyled (#36274) @michaldudak
The MultiSelectUnstyled was removed. The SelectUnstyled
component with the multiple
prop should be used instead. Additionally, the SelectUnstyledProps received a second generic parameter: Multiple extends boolean
. If you deal with strictly single- or multi-select components, you can hard-code this parameter to false
or true
, respectively. Below is an example of how the migration should look like:
-import MultiSelectUnstyled from '@mui/base/MultiSelectUnstyled';
+import SelectUnstyled from '@mui/base/SelectUnstyled';
export default App() {
-return <MultiSelectUnstyled />
+return <SelectUnstyled multiple />
}
import type
syntax (#36411) @ZeeshanTamboliChangelog
@mui/base@5.0.0-alpha.119
<!-- 29 -->[base] Remove classes
prop from the Base components that have it (#36157) @hbjORbj
These are the components affected by this change: ModalUnstyled, SliderUnstyled, TablePaginationUnstyled and TablePaginationActionsUnstyled.
You can replace the classes
prop by providing the class name prop directly to the prop via slotProps
. Below is an example of how the migration should look like:
<TablePaginationUnstyled
- classes={{ toolbar: 'toolbar-classname', menuItem: 'menuItem-classname' }}
+ slotProps={{ toolbar: { className: 'toolbar-classname' }, menuItem: { className: 'menuItem-classname'}}}
/>
<!-- 28 -->[base] Move hooks to their own directories (#36235) @hbjORbj
Base hooks (e.g., useSelect
) are no longer exported from {Component}Unstyled
directories and instead they have their own directories.
Below is an example of how the migration should look like:
-import { useBadge } from '@mui/base/BadgeUnstyled';
+import useBadge from '@mui/base/useBadge';
You can use this codemod to help with the migration.
Changelog
@mui/base@5.0.0-alpha.118
slotProps
per slot (#35964) @hbjORbjuseAutocomplete
disabled prop not disabling the input (#36076) @sai6855Changelog
@mui/base@5.0.0-alpha.116
Changelog
@mui/base@5.0.0-alpha.115
<!-- 04 -->[SliderUnstyled] Improved logic for displaying the value label (#35805) @ZeeshanTamboli
valueLabelDisplay
prop is removed from SliderUnstyled
. The prop was not working as intended in SliderUnstyled
(See #35398). You can instead provide a valueLabel
slot with the slots
prop API to show the value label:- <SliderUnstyled valueLabelDisplay="on" />
+ <SliderUnstyled slots={{ valueLabel: SliderValueLabel }} />
The following demo shows how to show a value label when it is hovered over with the thumb: https://mui.com/base-ui/react-slider/#value-label
sliderUnstyledClasses
since they are not needed for the value label:- valueLabel
- valueLabelOpen
- valueLabelCircle
- valueLabelLabel
In the custom value label component, you can define your own classNames and target them with CSS.
The SliderValueLabelUnstyled
component is removed from SliderUnstyled. You should provide your own custom component for the value label.
To avoid using React.cloneElement
API in value label, the component hierarchy structure of the value label is changed. The value label is now inside the Thumb slot - Thumb
-> Input
, ValueLabel
.
inputRef
is ignored (#35807) @sai6855Changelog
@mui/base@5.0.0-alpha.114
Changelog
@mui/base@5.0.0-alpha.113
MenuItem
to list all valid props (#35561) @mnajdovaVite.js with TypeScript
example (#35683) @miha53cevicAll contributors of this release in alphabetical order: @CowDotDev, @flaviendelangle, @hamirmahal, @hbjORbj, @koolskateguy89, @michaldudak, @miha53cevic, @mnajdova, @oliviertassinari, @Ryczko, @sai6855, @samuelsycamore, @siriwatknp, @ZeeshanTamboli
Changelog
@mui/base@5.0.0-alpha.112
isRtl
from Material UI's Slider props (#35564) @michaldudak