Big thanks to the 39 contributors who made this release possible.
Here are some highlights ✨:
@material-ui/core@v4.9.1fullWidth prop to FormControl context (#19369) @EsoterikStare@material-ui/icons@v4.9.1@material-ui/system@v4.9.1@material-ui/lab@v4.0.0-alpha.41@ts-ignore usage (#19504) @eps1lonBig thanks to the 43 contributors who made this release possible.
Here are some highlights ✨:
@material-ui/core@v4.9.0expanded (#19332) @eps1lon@material-ui/styles@v4.8.0@material-ui/types@v5.0.0@material-ui/lab@v4.0.0-alpha.40Big thanks to the 19 contributors who made this release possible.
Here are some highlights since 4.8.0 ✨:
@material-ui/core@v4.8.3hidden class key to Collapse typings (#19044) @pvdstel@material-ui/lab@v4.0.0-alpha.39Big thanks to the 22 contributors who made this release possible.
@material-ui/core@v4.8.2dividers class types (#18984) @NickCis@material-ui/styles@v4.8.2@material-ui/lab@v4.0.0-alpha.38[Skeleton] Add wave animation support (#19014) @oliviertassinari
-<Skeleton disableAnimation />
+<Skeleton animation={false} />
Big thanks to the 24 contributors who made this release possible.
@material-ui/core@v4.8.1@material-ui/lab@v4.0.0-alpha.37ChipProps prop (#18917) @ChrisWilesBig thanks to the 29 contributors who made this release possible.
Here are some highlights ✨:
@material-ui/core@v4.8.0popperArrow to TooltipClassKey (#18772) @umidbekkarimov@material-ui/lab@v4.0.0-alpha.36readOnly to disabled in text-fields.md example (#18792) @sterjoskiBig thanks to the 18 contributors who made this release possible.
@material-ui/core@v4.7.2@material-ui/lab@v4.0.0-alpha.35ssrMatchMedia required for client rending as well (#18680) @moshestBig thanks to the 27 contributors who made this release possible.
Here are some highlights ✨:
@material-ui/core@v4.7.1@material-ui/lab@v4.0.0-alpha.34@babel/* deps (#18552) @eps1lon@material-ui/core@v3.9.4[Portal] Fix circular PortalProps Types (#18602)
Fix TypeScript 3.7 support
Big thanks to the 27 contributors who made this release possible.
Here are some highlights ✨:
@material-ui/core@v4.7.0displayName (#18481) @NMinhNguyenarrow prop (#18323) @goleary@material-ui/lab@v4.0.0-alpha.33Big thanks to the 19 contributors who made this release possible.
Here are some highlights ✨:
@material-ui/core@v4.6.1@material-ui/lab@v4.0.0-alpha.32diff --git a/docs/src/pages/components/autocomplete/FixedTags.js b/docs/src/pages/components/autocomplete/FixedTags.js
index 757d66a97..a4f36edd5 100644
--- a/docs/src/pages/components/autocomplete/FixedTags.js
+++ b/docs/src/pages/components/autocomplete/FixedTags.js
@@ -11,17 +11,9 @@ export default function FixedTags() {
options={top100Films}
getOptionLabel={option => option.title}
defaultValue={[top100Films[6], top100Films[13]]}
- renderTags={(value, { className, onDelete }) =>
+ renderTags={(value, getTagProps) =>
value.map((option, index) => (
- <Chip
- key={index}
- disabled={index === 0}
- data-tag-index={index}
- tabIndex={-1}
- label={option.title}
- className={className}
- onDelete={onDelete}
- />
+ <Chip disabled={index === 0} label={option.title} {...getTagProps({ index })} />
))
}
style={{ width: 500 }}
Big thanks to the 26 contributors who made this release possible.
Here are some highlights ✨:
The positive feedback we had this early version of the component is encouraging. Developers should be able to rely on it in production within a couple of weeks (from a bug perspective). We will take more time to stabilize the API, a couple of months.
By chance, it’s the third year in a row we release on november 5th. The number of contributors involved, for a similar one-week period, has grown from 12 contributors (2017) to 16 contributors (2018) to 26 contributors (2019). We are proud of the community. Let’s keep this trend going 🚀.
@material-ui/core@v4.6.0@material-ui/styles@v4.6.0@material-ui/lab@v4.0.0-alpha.31@material-ui/* packages for Codesandbox CI (#18100) @eps1lonBig thanks to the 48 contributors who made this release possible!
Here are some highlights ✨:
🔍 Introduce a new Autocomplete component in the lab to support the autocomplete, combobox and multi-select use cases (#17037) @dreamsinspace.
This new component will replace the third-party integration examples once it graduates from the lab to the core. It was one of the most requested features (by number of 👍 on the corresponding issue).
📚 Show the JSX by default for small examples (#17831) @mbrookes.
♿️ Improve Gatsby’s Modal support (#17972) @sreetej1998.
💅 Improve Chrome autofill dark theme support (#17863) @MAkerboom.
@material-ui/core@v4.5.2component (#17825) @Nikhil-Pavan-Sai@material-ui/styles@v4.5.2@material-ui/system@v4.5.2@material-ui/lab@v4.0.0-alpha.30react@next (#18008) @eps1lonBig thanks to the 28 contributors who made this release possible!
Here are some highlights ✨:
📚 Change imports from @material-ui/styles to @material-ui/core/styles (#17447) @mnemanja
The presence of two almost identical import paths has been a source of confusion: @material-ui/styles and @material-ui/core/styles.
Starting with v4.5.1, the documentation mentions @material-ui/core/styles as much as possible.
-import { makeStyles } from '@material-ui/styles';
+import { makeStyles } from '@material-ui/core/styles';
This change removes the need to install the @material-ui/styles package directly.
It prevents the duplication of @material-ui/styles in bundles and avoids confusion.
You can learn more about the difference in the documentation.
♿️ Improve the accessibility of the table and select components (#17696, #17773) @adeelibr, @eps1lon.
📊 Launch a developer survey as a precursor to a major DatePicker enhancement effort.
💄 Add support for different slider track mode (#17714) @slipmat.
And many more 🐛 bug fixes and 📚 improvements.
@material-ui/core@v4.5.1@material-ui/icons@v4.5.1@material-ui/lab@v4.0.0-alpha.29@material-ui/system@v4.5.1Big thanks to the 20 contributors who made this release possible!
Here are some highlights ✨:
💄 Add startIcon and endIcon props for the button (#17600) @mbrookes
import DeleteIcon from '@material-ui/icons/Delete';
<Button startIcon={<DeleteIcon />}>
Delete
</Button>
💅 Adjust menu styles to match spec (#17332) @damir-sirola
💅 Adjust chip styles to match spec (#17584) @oliviertassinari
And many more 🐛 bug fixes and 📚 improvements.
@material-ui/core@v4.5.0@material-ui/lab@v4.0.0-alpha.28[Slider] Remove from the lab (#17528) @oliviertassinari
-import { Slider } from '@material-ui/lab';
+import { Slider } from '@material-ui/core';
@material-ui/system@v4.5.0@material-ui/codemod@v4.5.0@material-ui/codemod@v4.5.0@testing-library/dom (#17573) @eps1lonBig thanks to the 23 contributors who made this release possible! This is a stability release.
@material-ui/core@v4.4.3@testing-library for test (#17390) @eps1lon@material-ui/styles@v4.4.3@material-ui/lab@v4.0.0-alpha.27@material-ui/icons@v4.4.3@material-ui/system@v4.4.3Big thanks to the 7 contributors who made this release possible! This is a quick release after v4.4.1 to solve 3 regressions.
@material-ui/core@v4.4.2Big thanks to the 21 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v4.4.1@material-ui/icons@v4.4.1@material-ui/styles@v4.4.1@material-ui/lab@v4.0.0-alpha.26Big thanks to the 29 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v4.4.0@material-ui/lab@v4.0.0-alpha.25Big thanks to the 22 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v4.3.3@material-ui/lab@v4.0.0-alpha.24@material-ui/styles@v4.3.3Big thanks to the 22 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v4.3.2@material-ui/lab@v4.0.0-alpha.23@material-ui/system@v4.3.3!important in borderColor prop (#16875) @rogerclotetBig thanks to the 18 contributors who made this release possible!
@material-ui/core@v4.3.1required prop (#16809) @pranshuchittora@material-ui/lab@v4.0.0-alpha.22( to withStyle docs (#16816) @SneakyFish5@material-ui/pickers (#16823) @eps1lonBig thanks to the 23 contributors who made this release possible!
Here are some highlights ✨:
🌳 Introduce a new Tree View component in the (#14827) @joshwooding.
This is a first step toward a feature rich tree view component. We will keep iterate on it to add customization demos, filter, drag and drop, and checkboxes. You can find the documentation under this URL.
💄 Support vertical tabs (#16628) @josephpung.
You can learn more about it following this URL.
📚 Remove the prop-types from TypeScript demos (#16521) @merceyz.
The runtime prop-types are often redundant with the static type checks. We have removed them from the TypeScript demos.
⚛️ Add two codemods to improve the imports (#16192) @jedwards1211.
If you are not familiar with codemods, check the library out. This is a tool tool to assist you with large-scale codebase refactors. We introduce two new codemods in this release:
optimal-imports: Material-UI supports tree shaking for modules at 1 level depth maximum.
You shouldn’t import any module at a higher level depth.-import createMuiTheme from '@material-ui/core/styles/createMuiTheme';
+import { createMuiTheme } from '@material-ui/core/styles';
top-level-imports: Converts all @material-ui/core submodule imports to the root module.-import createMuiTheme from '@material-ui/core/styles/createMuiTheme';
+import { createMuiTheme } from '@material-ui/core';
💄 Support small switch (#16620) @darkowic.
You can learn more about it following this URL.
And many more 🐛 bug fixes and 📚 improvements.
@material-ui/core@v4.3.0completed class key to TypeScript definitions (#16662) @pranshuchittora@material-ui/lab@v4.0.0-alpha.21@material-ui/styles@@4.3.0@material-ui/codemod@v4.3.0@material-ui/system@v4.3.2Big thanks to the 25 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v4.2.1inputComponent (#16399) @eps1lon@material-ui/styles@v4.2.1styled components (#16379) (#16478) @akomm@material-ui/system@v4.3.1@material-ui/lab@v4.0.0-alpha.20Big thanks to the 24 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v4.2.0@material-ui/styles@v4.2.0overrides (#16420) @eps1lon@material-ui/lab@v4.0.0-alpha.19Big thanks to the 4 contributors who made this release possible! This is a quick release after a regression that occurred in 4.1.2.
@material-ui/core@v4.1.3@material-ui/lab@v4.0.0-alpha.18Big thanks to the 30 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v4.1.2autoFocus TypeScript types (#16289) @BassT@material-ui/icons@v4.2.1@material-ui/system@v4.3.0@material-ui/lab@v4.0.0-alpha.17@material-ui/styles@v4.1.2Big thanks to the 10 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v4.1.1@material-ui/styles@v4.1.1@material-ui/icons@v4.2.0@material-ui/lab@v4.0.0-alpha.16@material-ui/system@v4.2.0CSS to MUI webpack Loader (#16175) @sabrinaluoA big thanks to the 26 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v4.1.0@material-ui/system@v4.1.0@material-ui/styles@v4.1.0@material-ui/icons@v4.1.0A big thanks to the 30 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v4.0.2@material-ui/styles@v4.0.2@material-ui/system@v4.0.2@material-ui/lab@v4.0.0-alpha.15@material-ui/codemod@v4.0.2A big thanks to the 23 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v4.0.1@material-ui/icons@v4.0.1@material-ui/codemod@v4.0.1@material-ui/styles@v4.0.1@material-ui/lab@v4.0.0-alpha.14Some statistics with v4 compared to the release of v1 one year ago:
@material-ui/lab@v4.0.0-alpha.13@material-ui/system@v4.0.0A big thanks to the 17 contributors who made this release possible!
We have done the very last breaking changes (nothing significant). The release of v4 is imminent, stay tuned!
@material-ui/core@v4.0.0-rc.0[ClickAwayListener] Fix scrollbar interaction (#15743) @Umerbhat
-<ClickAwayListener />
+<ClickAwayListener mouseEvent="onMouseUp" />
We recommend the default value since mouseup will be triggered by clicks
on scrollbars.
[Tabs] Hide scrollbar buttons when possible (#15676) @whitneymarkov
-<Tabs />
+<Tabs scrollButtons="desktop" />
[Tabs] Remove deprecated fullWidth and scrollable props (#15670) @mbrookes
-<Tabs fullWidth scrollable />
+<Tabs variant="scrollable" />
@material-ui/icons@v4.0.0-rc.0@material-ui/lab@v4.0.0-alpha.12A big thanks to the 13 contributors who made this release possible!
This is a stability release preparing v4.
@material-ui/core@v4.0.0-beta.2component prop (#15627) @eps1lon@material-ui/styles@v4.0.0-beta.2@material-ui/system@v4.0.0-beta.2@material-ui/lab@v4.0.0-alpha.11A big thanks to the 19 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v4.0.0-beta.1@material-ui/styles@v4.0.0-beta.1@material-ui/types@v4.0.0-beta.2@material-ui/system@v4.0.0-beta.1@material-ui/lab@v4.0.0-alpha.10A big thanks to the 21 contributors who made this release possible!
Here are some highlights ✨:
The library has entered the beta phase of v4. We are grateful to all the contributors that have helped us so far. We will focus or effort on the stability of the library for the next two weeks. We don’t plan more breaking changes, at the exception of changes that are required to fix bugs or that have minor impacts. We hope we can release v4 on May 15th, one year after v1.
Please try the beta out! You can find an upgrade guide to ease the transition. You will learn more about v4 in the final release blog post and our plans for the future.
@material-ui/core@v4.0.0-beta.0[styles] Generate global class names (#15140) @oliviertassinari Remove the dangerouslyUseGlobalCSS options (makes it the default behavior).
[Modal] -74% bundle size reduction when used standalone (#15466) @oliviertassinari Remove the classes customization API for the Modal component.
[core] Remove RootRef usage (#15347) @joshwooding The Modal and Dialog child needs to be able to hold a ref.
class Component extends React.Component {
render() {
return <div />
}
}
-const MyComponent = props => <div {...props} />
+const MyComponent = React.forwardRef((props, ref) => <div ref={ref} {...props} />);
<Modal><Component /></Modal>
<Modal><MyComponent /></Modal>
<Modal><div /></Modal>
[ClickAwayListener] Hide react-event-listener (#15420) @oliviertassinari
[Slide] Convert to function component (#15344) @joshwooding The child needs to be able to hold a ref.
class Component extends React.Component {
render() {
return <div />
}
}
-const MyComponent = props => <div {...props} />
+const MyComponent = React.forwardRef((props, ref) => <div ref={ref} {...props} />);
<Slide><Component /></Slide>
<Slide><MyComponent /></Slide>
<Slide><div /></Slide>
@material-ui/styles@v4.0.0-beta.0A big thanks to the 27 contributors who made this release possible!
Here are some highlights ✨:
We hope the next release can be 4.0.0-beta.0. Here are the last breaking changes we want to introduce:
dangerouslyUseGlobalCSS option (make it the default behavior) (#15140)We have done a lot of changes in the alpha phase. The beta phase will be used to stabilize the library, we might have introduced bugs. We will encourage people to try the beta out. We hope the migration will be smooth with the upgrade guide.
We hope 2-3 weeks of beta will be enough. We plan on releasing v4 stable in May.
@material-ui/core@v4.0.0-alpha.8[Paper] Reduce the default elevation (#15243) @oliviertassinari Change the default Paper elevation to match the Card and the Expansion Panel:
-<Paper />
+<Paper elevation={2} />
[List] Update to match the specification (#15339) @oliviertassinari Rework the list components to match the specification:
ListItemAvatar component is required when using an avatarListItemIcon component is required when using a left checkboxedge property should be set on the icon buttons.[actions] Rename disableActionSpacing to disableSpacing (#15355) @oliviertassinari
disableActionSpacing prop disableSpacing.disableActionSpacing CSS class.action CSS class spacing.disableActionSpacing prop disableSpacing.action CSS class spacing.action CSS class spacing.[Tooltip] Convert to function component (#15291) @joshwooding
The child of the Tooltip needs to be able to hold a ref
class Component extends React.Component {
render() {
return <div />
}
}
-const MyComponent = props => <div {...props} />
+const MyComponent = React.forwardRef((props, ref) => <div ref={ref} {...props} />);
<Tooltip><Component /></Tooltip>
<Tooltip><MyComponent /></Tooltip>
<Tooltip><div /></Tooltip>
@material-ui/styles@v4.0.0-alpha.8@material-ui/system@v4.0.0-alpha.8@material-ui/docs@v4.0.0-alpha.8strict option to createMount (#15317) @eps1lonA big thanks to the 24 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v4.0.0-alpha.7[Switch][Radio][Checkbox] Improve specification compliance (#15097) @oliviertassinari
Refactore the implementation to make it easier to override the styles. Rename the class names to match the specification wording:
-icon
-bar
+thumb
+track
[Snackbar] Match the new specification (#15122) @oliviertassinari
Slide to Grow.[TextField] Fix height inconsistency (#15217) @gautam-relayr
Remove the inputType class from InputBase.
@material-ui/styles@v4.0.0-alpha.7type type of button related components (#15158) @eps1lonA big thanks to the 20 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v4.0.0-alpha.6[Typography] Better defaults (#15100) @oliviertassinari
body2 to body1.
A font size of 16px is a better default than 14px.
Bootstrap, material.io or even our documentation use 16px as a default font size.
14px like Ant Design is understandable as Chinese users have a different alphabet.
We document 12px as the default font size for Japanese.color="default" to color="initial" following the logic of #13028.
The usage of default should be avoided, it lakes semantic.[Container] Move to the core (#15062) @oliviertassinari
@material-ui/styles@v4.0.0-alpha.6@material-ui/lab@v4.0.0-alpha.6Big thanks to the 11 contributors who made this release possible!
This release fixes an important regression with TypeScript: https://github.com/mui-org/material-ui/issues/15076.
@material-ui/core@v3.9.3type prop (#15096) @karlbohlmarkN/A
A big thanks to the 23 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v4.0.0-alpha.5[TextField] Prevent fullwidth textfield expanding the screen (#14988) @FMcIntosh
Change the default box sizing model of the InputBase. It uses the following CSS now:
box-sizing: border-box;
It solves issues with the fullWidth prop.
[Modal] Ignore event.defaultPrevented (#14991) @oliviertassinari
The new logic closes the Modal even if event.preventDefault() is called on the key down escape event.
event.preventDefault() is meant to stop default behaviors like clicking a checkbox to check it, hitting a button to submit a form, and hitting left arrow to move the cursor in a text input etc.
Only special HTML elements have these default behaviors.
You should use event.stopPropagation() if you don’t want to trigger an onClose event on the modal.
@material-ui/styles@v4.0.0-alpha.5A big thanks to the 17 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v4.0.0-alpha.4[ButtonBase] Require host or ref forwarding components (#13664) @eps1lon
[SvgIcon] Rename nativeColor -> htmlColor (#14863) @oliviertassinari
React solved the same problem with the for HTML attribute, they have decided to call the prop htmlFor. This change follows the same reasoning.
-<AddIcon nativeColor={secondary.contrastText} />
+<AddIcon htmlColor={secondary.contrastText} />
[Divider] Remove the deprecated inset prop (#14826) @joshwooding
-<Divider inset />
+<Divider variant="inset" />
[Box] Remove the unstable prefix & import the right version (#14845) @pheuter
-import { unstable_Box as Box } from '@material-ui/core/Box';
+import Box from '@material-ui/core/Box';
anchorEl is invalid (#13468) @Andarist@material-ui/styles@v4.0.0-alpha.4@material-ui/lab@v4.0.0-alpha.4A big thanks to the 14 contributors who made this release possible!
Here are some highlights ✨:
React.forwardRef() (#14714, #14737, #14738, #14775) @eps1lon.@material-ui/core@v4.0.0-alpha.3[useMediaQuery] Remove unstable prefix (#14593)
-import { unstable_useMediaQuery as useMediaQuery } from '@material-ui/core/useMediaQuery';
+import useMediaQuery from '@material-ui/core/useMediaQuery';
[DialogActions] action CSS class is applied to root element if disableActionSpacing={false} instead of children (#14795)
[DialogContentText] Use typography variant body1 instead of subtitle1 (#14795)
[MenuItem] Remove fixed height (#14799) @KyruCabading Remove the fixed height of the MenuItem. The padding and line-height are used by the browser to compute the height.
@material-ui/styles@v4.0.0-alpha.3Remove the MuiThemeProvider component:
-import { MuiThemeProvider } from '@material-ui/core/styles';
+import { ThemeProvider } from '@material-ui/styles';
Remove the @material-ui/styles/install module.
-import { install } from '@material-ui/styles';
-install();
@material-ui/lab@v4.0.0-alpha.3A big thanks to the 23 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v4.0.0-alpha.2[Tabs] Simplify override (#14638) @oliviertassinari
We have removed the labelContainer, label and labelWrapped class keys.
We have removed 2 intermediary DOM elements.
You should be able to move the custom styles to the root class key.

[Table] Add dense support (#14561) @leMaik
-<TableCell numeric>{row.calories}</TableCell>
+<TableCell align="right">{row.calories}</TableCell>
dense mode was promoted to a different property:-<TableCell padding="dense" />
+<TableCell size="small" />
Every component except Dialog, MenuList, Modal, Popover and Tabs forward
their innerRef (#14536).
This is implemented by using React.forwardRef. This affects the internal component
tree and display name and therefore might break shallow or snapshot tests.
innerRef will no longer return a ref to the instance
(or nothing if the inner component is a function component) but a ref to its root component.
The corresponding API docs list the root component.
@material-ui/styles@v4.0.0-alpha.2@material-ui/lab@v4.0.0-alpha.2@material-ui/utils@v4.0.0-alpha.2A big thanks to the 16 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v4.0.0-alpha.1[Typography] Remove deprecated Typography variants (#14562) @joshwooding
display: block default typograpghy style.
You can use the new display?: 'initial' | 'inline' | 'block'; property.headlineMapping property to better align with its purpose.-<MuiTypography headlineMapping={headlineMapping}>
+<MuiTypography variantMapping={variantMapping}>
[InputLabel] Remove FormLabelClasses in favor of asterisk class (#14504) @umairfarooq44
You should be able to override all the styles of the FormLabel component using the css API of the InputLabel component. We do no longer need the FormLabelClasses property.
<InputLabel
- FormLabelClasses={{ asterisk: 'bar' }}
+ classes={{ asterisk: 'bar' }}
>
Foo
</InputLabel>
The TablePagination component does no longer try to fix invalid (page, count, rowsPerPage) property combinations. It raises a warning instead.
@material-ui/styles@v4.0.0-alpha.1Remove the first option argument of withTheme(). The first argument was a placeholder for a potential future option. We have never found a need for it. It’s time to remove this argument. It matches the emotion and styled-components API.
-const DeepChild = withTheme()(DeepChildRaw);
+const DeepChild = withTheme(DeepChildRaw);
@material-ui/icons@v4.0.0-alpha.1This is our first unstable release toward Material-UI v4.0.0. We try to release a major every 6-12 months. This gives us the opportunity to remove deprecated APIs, upgrade our peer dependencies and more importantly, keep up with the direction the community is taking.
A big thanks to the 28 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v4.0.0-alpha.0[core] Increase React peer dependency to v16.8.0 (#14432) @oliviertassinari
The upgrade path to React 16.8.0 should be pretty easy for our users. Introducing this breaking change in v4 enables the following:
React.memo() API.[Grid] Use a unitless spacing API (#14099) @ifndefdeadmau5
In order to support arbitrary spacing values and to remove the need to mentally count by 8, we are changing the spacing API:
/**
* Defines the space between the type `item` component.
* It can only be used on a type `container` component.
*/
- spacing: PropTypes.oneOf([0, 8, 16, 24, 32, 40]),
+ spacing: PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),
Going forward, you can use the theme to implement a custom Grid spacing transformation function: https://material-ui.com/system/spacing/#transformation.
The theme.palette.augmentColor() method no longer performs a side effect on its input color.
In order to use it correctly, you have to use the output of this function.
-const background = { main: color };
-theme.palette.augmentColor(background);
+const background = theme.palette.augmentColor({ main: color });
console.log({ background });
[core] Change UMD output name to ‘MaterialUI’ (#13142) @tkrotoff
This change eases the use of Material-UI with a CDN:
const {
Button,
TextField,
-} = window['material-ui'];
+} = MaterialUI;
It’s consistent with the other projects:
[Button] Remove deprecated props and styles (#14383) @mbrookes
Remove the deprecated button flat, raised and fab variants:
-<Button variant="raised" />
+<Button variant="contained" />
-<Button variant="flat" />
+<Button variant="text" />
-import Button from '@material-ui/core/Button';
-<Button variant="fab" />
+import Fab from '@material-ui/core/Fab';
+<Fab />
theme.spacing.unit usage is deprecated, you can use the new API (#14099) @ifndefdeadmau5: [theme.breakpoints.up('sm')]: {
- paddingTop: theme.spacing.unit * 12,
+ paddingTop: theme.spacing(12),
},
Tip: you can provide more than one argument: theme.spacing(1, 2) // = '8px 16px'
@material-ui/styles@v4.0.0-alpha.0@material-ui/system@v4.0.0-alpha.0@material-ui/icons@v4.0.0-alpha.0@material-ui/docs@v4.0.0-alpha.0@material-ui/lab@v4.0.0-alpha.0-import Breadcrumbs from '@material-ui/lab/Breadcrumbs';
+import Breadcrumbs from '@material-ui/core/Breadcrumbs';
⚠️ The height has changed - it might break your layout.
/es build (#14422) @eps1lonBig thanks to the 16 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v3.9.2@material-ui/styles@v3.0.0-alpha.10@material-ui/lab@v3.0.0-alpha.30Big thanks to the 30 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v3.9.1home and end key support (#14212) @dallin-christensen@material-ui/styles@v3.0.0-alpha.9@material-ui/lab@v3.0.0-alpha.29@material-ui/system@v3.0.0-alpha.2Big thanks to the 17 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v3.9.0@material-ui/styles@v3.0.0-alpha.8Big thanks to the 5 contributors who made this release possible!
We are making a quick release to fix an important TypeScript regression.
@material-ui/core@v3.8.3InputBaseComponentProps type (#14082) @franklixuefeiBig thanks to the 20 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v3.8.2@material-ui/icons@v3.0.2@material-ui/lab@v3.0.0-alpha.28@material-ui/styles@v3.0.0-alpha.7@material-ui/system@v3.0.0-alpha.1@material-ui/utils@v3.0.0-alpha.3@material-ui/docs@v3.0.0-alpha.9@material-ui/core@v3.8.1@material-ui/styles@v3.0.0-alpha.6@material-ui/lab@v3.0.0-alpha.27@material-ui/utils@v3.0.0-alpha.2Big thanks to the 15 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v3.8.0The Tabs fullWidth and scrollable properties can’t be used at the same time. The API change prevents any awkward usage.
-<Tabs fullWidth>
+<Tabs variant="fullWidth">
@material-ui/system@v3.0.0-alpha.0@material-ui/styles@v3.0.0-alpha.5Big thanks to the 15 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v3.7.191a95d3821) @AkselsLedinsBig thanks to the 11 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v3.7.0We are allowing more align variants (left, center, right, inherit, justify). Following our API guideline, we are using an enum over a boolean. Keep in mind that monetary or generally number fields should be right aligned as that allows you to add them up quickly in your head without having to worry about decimals.
-<TableCell numeric>
+<TableCell align="right">
PaperComponent property & draggable demo (#13879) @rfbotto@material-ui/lab@v3.0.0-alpha.26@material-ui/styles@v3.0.0-alpha.4@material-ui/utils@v3.0.0-alpha.1Big thanks to the 20 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v3.6.2@material-ui/lab@v3.0.0-alpha.25@material-ui/styles@v3.0.0-alpha.3Big thanks to the 15 contributors who made this release possible!
There are no fundamental changes in this version. It’s a stability release after v3.6.0. It contains tons of bug fixes 🐛.
@material-ui/core@v3.6.1ddfa8e0215) @oliviertassinari@material-ui/styles@v3.0.0-alpha.2Big thanks to the 28 contributors who made this release possible!
The last release was two weeks ago. Last weekend, we have missed the release train 🚃. As a consequence, this is a dense release.
Here are some highlights ✨:
@material-ui/core@v3.6.0The floating action button doesn’t share many styles with the default button component.
We are extracting the variant into its own component.
This way, we better isolate the concerns.
We will remove the FAB styles from the button in v4, making the Button component more lightweight, a win for people overriding our styles.
-import Button from '@material-ui/core/Button';
+import Fab from '@material-ui/core/Fab';
-<Button variant="fab" color="primary">
+<Fab color="primary">
<AddIcon />
-</Button>
+</Fab>
variant prop (#13574) @joshwoodingWe are introducing a new variant to the divider component: middle. Following our API guideline, we can no longer use a boolean property, it needs to be an enum, hence the introduction of the variant property.
import Divider from '@material-ui/core/Divider';
-<Divider inset />
+<Divider variant="inset" />
SwipeAreaProps property (#13592) @SerhiiBilyk7d2070fb38) @oliviertassinari@material-ui/lab@v3.0.0-alpha.24@material-ui/styles@v3.0.0-alpha.1@material-ui/docs@v3.0.0-alpha.8Big thanks to the 13 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/styles package 💅 (#13503).The Material-UI’s styling solution has pretty much stayed the same for the last 12 months. Some interesting CSS-in-JS libraries like styled-components, emotion or linaria have emerged. This new package is a significant step forward. Some of the key features:
Here is an example: https://codesandbox.io/s/vjzn5z4k77.
import Button from '@material-ui/core/Button';
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
// Like https://github.com/brunobertolini/styled-by
const styledBy = (property, mapping) => props => mapping[props[property]];
const useStyles = makeStyles({
root: {
background: styledBy('color', {
red: 'linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%)',
blue: 'linear-gradient(45deg, #2196F3 30%, #21CBF3 90%)',
}),
border: 0,
borderRadius: 3,
boxShadow: styledBy('color', {
red: '0 3px 5px 2px rgba(255, 105, 135, .3)',
blue: '0 3px 5px 2px rgba(33, 203, 243, .3)',
}),
color: 'white',
height: 48,
padding: '0 30px',
},
});
function MyButton(props) {
const { color, ...other } = props;
const classes = useStyles(props);
return <Button className={classes.root} {...other} />;
}
function AdaptingHook() {
return (
<div>
<MyButton color="red">Red</MyButton>
<br />
<br />
<MyButton color="blue">Blue</MyButton>
</div>
);
}
export default AdaptingHook;
Powered by JSS.
@material-ui/core@v3.5.1@material-ui/styles@v3.0.0-alpha.0Corrupted, to not use.
Big thanks to the 16 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v3.4.0labelPlacement property variants (#13499) @JulienMalige@material-ui/lab@v3.0.0-alpha.23Big thanks to the 17 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v3.3.2@material-ui/lab@v3.0.0-alpha.22Big thanks to the 8 contributors who made this release possible!
This is a quick patch after an important regression with the Modal component.
@material-ui/core@v3.3.1Big thanks to the 26 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v3.3.0@material-ui/lab@v3.0.0-alpha.21@material-ui/docs@v3.0.0-alpha.7listItem jss class (#13269, #13268) @G-Rathmargin jss class (#13318) @G-RathBig thanks to the 3 contributors who made this release possible! This is a quick patch after important regressions.
@material-ui/core@v3.2.2Big thanks to the 19 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v3.2.1anchorOrigin.vertical=enter (#13238) @iamhosseindhv@material-ui/lab@v3.0.0-alpha.20filled-input link text to FilledInput (#13223) @G-RathBig thanks to the 18 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v3.2.0This is a backward compatible change. You can opt-in the usage of the new Material Design typography specification. To learn more about the upgrade path, follow https://material-ui.com/style/typography/#migration-to-typography-v2.
This change updates the variant wording to match the one used in the Material Design specification.
-<Button variant="flat" />
+<Button variant="text" />
-<Button variant="raised" />
+<Button variant="contained" />
<div> element to children (#13067) @izyb@material-ui/lab@v3.0.0-alpha.19Big thanks to the 16 contributors who made this release possible! It contains many bug fixes 🐛 and documentation improvements 📝.
@material-ui/core@v3.1.2variant property to InputLabel type definition (#13009) @chrislambenotched should be boolean type (#13038) @zheeeng@material-ui/lab@v3.0.0-alpha.18@material-ui/docs@v3.0.0-alpha.6e5d757dc8f) @oliviertassinariBig thanks to the 21 contributors who made this release possible! It contains many bug fixes 🐛 and documentation improvements 📝.
@material-ui/core@v3.1.1@material-ui/lab@v3.0.0-alpha.173057f970a3) @oliviertassinariMuiFilledInput to ‘Overrides’ (#12938) @marcel-ernstBig thanks to the 24 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v3.1.0fontSize small and large (#12865) @JoshuaLicense@material-ui/lab@v3.0.0-alpha.16Big thanks to the 13 contributors who made this release possible!
@material-ui/core@v3.0.3@material-ui/lab@v3.0.0-alpha.15Big thanks to the 16 contributors who made this release possible!
Here are some highlights ✨:
@material-ui/core@v3.0.2ClickAwayListenerProps property (#12735) @tendermario@material-ui/lab@v3.0.0-alpha.14-import { ToggleButtonGroup } from '@material-ui/lab/ToggleButton';
+import ToggleButtonGroup from '@material-ui/lab/ToggleButtonGroup';
withRoot to accept props (#12712) @mattmccutchenN/A
Big thanks to the 10 contributors who made this release possible!
We are making a quick release after v3.0.0 to patch an incorrect peer dependency. It’s also a good opportunity to upgrade to the stable release of Babel 7.
@material-ui/core@v3.0.1@material-ui/icons@v3.0.1@material-ui/lab@v3.0.0-alpha.13Big thanks to the 27 contributors who made this release possible!
We are upgrading the major version of @material-ui/core to match the version of @material-ui/icons.
The next major release is planned for Q1, 2019.
Cut the package size by half.
It should make the npm installation twice as fast.
It’s not OK to have some installation timeout.
We have removed the /es folder.
-import AccessAlarm from '@material-ui/icons/es/AccessAlarm';
+import AccessAlarm from '@material-ui/icons/AccessAlarm';
Firefox 52 is the last version supported by Windows XP. The market share of Firefox 45 is 0.03%. We use the same strategy for Chrome.
by and enum typo in api.md (#12663) @G-RathBig thanks to the 22 contributors who made this release possible!
Here are some highlights ✨:
v7.0.0-rc.1 (#12581).N/A
Big thanks to the 23 contributors who made this release possible! This is a dense release!
Here are some highlights ✨:
N/A
inputRef is wired up to react-number-format’s input (#12444) @NMinhNguyenBig thanks to the 15 contributors who made this release possible! This release focuses on bug fixes 🐛.
N/A
Big thanks to the 22 contributors who made this release possible! I hope we will soon beat our previous record: 30 contributors in a single week.
Here are some highlights ✨:
N/A
Big thanks to the 15 contributors who made this release possible!
Here are some highlights ✨:
| Name | Description |
|---|---|
| root | Styles applied to the root element. |
| label | Styles applied to the span element that wraps the children. |
| … | … |
After many iterations, we are happy to announce @material-ui/icons v2.0.0 💃.
With this version, you can take advantage of all the icons recently released by Google:
https://material.io/tools/icons/. There are more than 5,000 icons.
(#12016, #12036, #12170, #12111, #12225)
The 1.4.0 release of Material-UI has introduced a new implementation of the Tooltip and Popper component. This release fixes a lot of issues following the rewrite (#12168, #12161, #12194, #12223, #12218). Thank you for reporting all these problems 🐛. Hopefully, it’s very stable now.
Creative Tim has just completed their second Material-UI theme 💅. It’s an important milestone for the themability of Material-UI. We are going to keep working on adding more themes to the list.
@material-ui/icons@2.0.0 allows React users to take advantage of the icons revamp the Material Design Team has been recently released. Some icons have been removed, ~150 new icons have been added, and some icons have been renamed. There are also currently some issues with the size of certain icons. Please refer to #12016 for further details.
innerRef to withWidth and withTheme (#12236) @iteloBig thanks to the 21 contributors who made this release possible. Here are some highlights ✨:
The component is -1kB gzipped smaller and much faster. You can render 100 of them on a page with no issue. It’s also introducing a new component: Popper, an abstraction on top of Popper.js.
You can now dynamically change the theme of the whole documentation site.
N/A
isPlainObject to avoid dropping prototypes (#12100) @kivlorBig thanks to the 13 contributors who made this release possible.
Here are some highlights ✨:
N/A
N/A
Big thanks to the 10 contributors who made this release possible.
Here are some highlights ✨:
N/A
auto to TypeScript definitions (#11933) @woobiancacreateStyles to import (#11975) @SylphonyN/A
Big thanks to the 6 contributors who made this release possible.
This release fixes some important regressions. We are making it outside of the normal schedule.
N/A
N/A
Big thanks to the 16 contributors who made this release possible.
Here are some highlights ✨:
N/A
allVariants key in the theme (#11802) @oliviertassinaricomponent property (#11844) @C-Rodg98168a2c74) @kofd7fe8c79dc) @oliviertassinaricomponent prop types (#11863) @jedwards1211N/A
Big thanks to the 15 contributors who made this release possible.
Here are some highlights ✨:
React.createRef support ⚛️ (#11757) @t49tran.withWidth() helperN/A
type property (#11728) @C-RodgBig thanks to the 23 contributors who made this release possible.
Here are some highlights ✨:
N/A
clickable property (#11613) @vilvaathibanpbBig thanks to the 30 contributors who made this release possible.
Here are some highlights ✨:
N/A
Our first stable v1 release! 🎉
It has taken us two years to do it, but Material-UI v1 has finally arrived! We are so excited about this release, as it’s setting a new course for the project. Thank you to everyone, especially to the team, and to everyone who’s contributed code, issue triage, and support. Thank you.
Some statistics with v1 while it was in alpha and beta:
Big thanks to the 10 contributors who made this release possible.
Here are some highlights ✨:
N/A
Big thanks to the 14 contributors who made this release possible.
Big thanks to the 11 contributors who made this release possible.
Here are some highlights ✨:
-import { withStyles } from 'material-ui/styles';
+import { withStyles } from '@material-ui/core/styles';
import {
Table,
TableBody,
TableCell,
TableFooter,
TablePagination,
TableRow,
} from 'material-ui';
-import CircularProgress from '@material-ui/core/Progress/CircularProgress';
+import CircularProgress from '@material-ui/core/CircularProgress';
-import { ListItem } from '@material-ui/core/List';
+import ListItem from '@material-ui/core/ListItem';
We provide a codemod to automate the migration: https://github.com/mui-org/material-ui/tree/master/packages/material-ui-codemod#import-path. I have used it to upgrade all the demos in the documentation :).
Split the responsabilities between the different components. Help with tree-shaking.
- <Grid item xs hidden={{ xlUp: true }}>
- <Paper>xlUp</Paper>
- </Grid>
+ <Hidden xlUp>
+ <Grid item xs>
+ <Paper>xlUp</Paper>
+ </Grid>
+ </Hidden>
The text underline color customization change:
underline: {
'&:after': {
- backgroundColor: purple[500],
+ borderBottomColor: purple[500],
},
},
Big thanks to the 4 contributors who made this release possible.
Here are some highlights ✨:
If you are using TypeScript, 2.8 or later is required.
N/A
Big thanks to the 7 contributors who made this release possible.
Here are some highlights ✨:
N/A
Big thanks to the 12 contributors who made this release possible.
Here are some highlights ✨:
I couldn’t find a clean way to support the render props pattern. Doing such would require to greatly reduce the usage of JSX. It would really harm source code readability.
Instead, I have been focusing on standardizing our component injection story. This way, we can go back to the render props after stable v1 is released and see if source code readability worth be sacrificed for the render prop pattern.
<Tabs
- TabScrollButton={TabScrollButtonWrapped}
+ ScrollButtonComponent={TabScrollButtonWrapped}
<TablePagination
- Actions={TablePaginationActionsWrapped}
+ ActionsComponent={TablePaginationActionsWrapped}
<Dialog
- transition={Transition}
+ TransitionComponent={Transition}
<Menu
- transition={Transition}
+ TransitionComponent={Transition}
<Snackbar
- transition={Transition}
+ TransitionComponent={Transition}
<Popover
- transition={Transition}
+ TransitionComponent={Transition}
<StepContent
- transition={Transition}
+ TransitionComponent={Transition}
This change is for consistency with the other components. No need to repeat the component name in the property.
<Snackbar
- SnackbarContentProps={{ 'aria-describedby': 'notification-message' }}
+ ContentProps={{ 'aria-describedby': 'notification-message' }}
Makes the API consistant with LinearProgress
<CircularProgress
- min={10}
- max={20}
- value={15}
+ value={(15 - 10) / (20 - 10) * 100}
/>
The rename started with #11090. I should have taken the time to complete it in the first place. This way, we are fully consistent with the spec: https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo :)
<ButtonBase
- onKeyboardFocus={this.handleVisible}
+ onFocusVisible={this.handleVisible}
Big thanks to the 17 contributors who made this release possible.
As long as you are providing a valid URL to <CardMedia image />, it should be working. However, previously " escaped URL will no longer work.
Big thanks to the 8 contributors who made this release possible.
Here are some highlights ✨:
[ButtonBase] Better keyboard focused story (#11090) @oliviertassinari
keyboardFocused feature focusVisible in order to follow the CSS specification wording:
https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudoclasses property to host the focus visible feature. The fact that the classes don’t cascade was making it hard to use. Instead, we rely on a focusVisibleClassName property. This is allowing any component along the rendering chain to use the feature. For instance, a Switch component: Switch > SwitchBase > IconButton > ButtonBase.<ButtonBase
- classes={{
- keyboardFocused: 'my-class-name',
- }}
+ focusVisibleClassName="my-class-name"
/>
Big thanks to the 15 contributors who made this release possible.
Here are some highlights ✨:
This breaking change is important. It might be the most painful to recover from before stable v1 (May 17th 2018). We have changed the CSS specificity rule to solve #10771 at scale.
It’s inspired by the Bootstrap approach to writing CSS. It follows two rules:
color and variant properties are considered a variant.
The lower the style specificity is, the simpler you can override it.:hover, :focus, etc.).
It allows much more control at the cost of more boilerplate.
Hopefully, it’s more intuitive.Example:
const styles = {
- checked: {
- color: green[500],
+ root: {
+ color: green[600],
+ '&$checked': {
+ color: green[500],
+ },
},
+ checked: {},
};
<Checkbox
classes={{
+ root: classes.root,
checked: classes.checked,
}}
/>
7c379fa7ba) @oliviertassinaristyle prop (#10994) @franklixuefeiBig thanks to the 14 contributors who made this release possible.
Here are some highlights ✨:
material-ui-icons to @material-ui/icons (#10957) @oliviertassinari-import FormatTextdirectionRToL from 'material-ui-icons/FormatTextdirectionRToL';
+import FormatTextdirectionRToL from '@material-ui/icons/FormatTextdirectionRToL';
global is defined before trying to use it (#10933) @jolissBig thanks to the 4 contributors who made this release possible.
Here are some highlights ✨:
We take advantage of the latest features of React 16.x.
React is allowing us to return an array of elements in the render method.
We have removed the useless root div element.
Nothing has changed for people using React 15.x.
Big thanks to the 25 contributors who made this release possible.
Here are some highlights ✨:
The negative margin implementation solution currently used comes with serious limitations. Material-UI is the only library with a non-zero default spacing between the items. Having zero spacing by default will ease the usage of the component.
-<Grid />
+<Grid spacing={16} />
For consistency with the removeEventListener Web API and the Snackbar disableWindowBlurListener property.
<Tooltip
- disableTriggerFocus
- disableTriggerHover
- disableTriggerTouch
+ disableFocusListener
+ disableHoverListener
+ disableTouchListener
/>
I have made a mistake in #8108. The property isn’t applied on a FormControl but on a FormLabel component.
-<InputLabel FormControlClasses={classes} />
+<InputLabel FormLabelClasses={classes} />
mixins.gutter signature (argument is optional) (#10814) @sebaldBig thanks to the 19 contributors who made this release possible.
This release comes with important theme upgrades. Here are some highlights ✨:
props theme key to globally inject properties on components (#10671).N/A
Big thanks to the 13 contributors who made this release possible.
Here are some highlights ✨:
These properties were introduced before classes.
Exposing a single pattern makes things more predictable and easier to work with.
-<Tabs buttonClassName="foo" indicatorClassName="bar" />
+<Tabs classes={{ scrollButtons: 'foo', indicator: 'bar' }} />
-<TextField labelClassName="foo" helperTextClassName="bar" />
+<TextField InputLabelProps={{ className: 'foo' }} FormHelperTextProps={{ className: 'bar' }} />
The new wording should clarify the purpose of the component. For instance, it’s not about adding JavaScript polyfills.
-<Reboot />
+<CssBaseline />
6e4cc72368) @oliviertassinariBig thanks to the 14 contributors who made this release possible.
Here are some highlights ✨:
Remove the fontSize property. The SvgIcon behavior is closer to the Icon behavior.
-<Icon fontSize />
-<SvgIcon fontSize />
+<Icon />
+<SvgIcon />
Now, you can use the font-size style property to changr the size of the icon.
This is an effort in order to harmonize the classes API. The best way to recover from this breaking change is to check the warnings in the console and to check the added documentation around the design rules around this API.
Big thanks to the 20 contributors who made this release possible.
Here are some highlights ✨:
N/A
SelectDisplayProps prop (#10408) @noah-potterBig thanks to the 21 contributors who made this release possible.
Here are some highlights ✨:
For consistency between the Input and the Checkbox, Switch, Radio the following small breaking changes have been done:
The usage of the inputProps property is no longer needed to apply an id to the input. The id is applied to the input instead of the root.
-<Checkbox inputProps={{ id: 'id' }} />
+<Checkbox id="id" />
The inputType property was renamed type.
-<Checkbox inputType="text" />
+<Checkbox type="text" />
The Material Design specification says that selection controls elements should use the application’s secondary color.
-<Checkbox />
-<Switch />
-<Radio />
+<Checkbox color="primary" />
+<Switch color="primary" />
+<Radio color="primary" />
a81e5f9e54) @oliviertassinariBig thanks to the 16 contributors who made this release possible.
Here are some highlights ✨:
component property (#10128) @sebald.N/A
Selet to Select (#10207) @JustkantBig thanks to the 12 contributors who made this release possible.
Here are some highlights ✨:
type property to variant (#10088, #10086, #10084, #10101) @mbrookes.position="sticky" with the AppBar (#10090) @scottastrophic.These breaking changes aim at providing a systematic solution to the boolean vs enum naming problem.
We have documented our approach to solving the problem in #10023. Basically, we enforce the following rule:
This is what motivated the button breaking change. Unfortunately type has its own meaning in the HTML specification. You can use it on the following elements: <button>, <input>, <command>, <embed>, <object>, <script>, <source>, <style>, <menu>.
We are using a more generic name to avoid the confusion: variant.
Umbrella pull request for: #10084, #10086, #10088.
<Button
- raised
+ variant="raised"
<Button
- fab
+ variant="fab"
<Typography
- type="title"
+ variant="title"
<MobileStepper
- type="dots"
+ variant="dots"
<Drawer
- type="persistent"
+ variant="persistent"
<LinearProgress
- mode="determinate"
+ variant="determinate"
<CircularProgress
- mode="determinate"
+ variant="determinate"
<Zoom
in={in}
- enterDelay={transitionDuration.exit}
+ style={{
+ transitionDelay: in ? transitionDuration.exit : 0,
+ }}
position="sticky" (#10090) @scottastrophicBig thanks to the 14 contributors who made this release possible.
Here are some highlights ✨:
Fun facts:
We have removed the “magic” <Icon> wrapping logic. It should be done explicitly now.
It’s making our components less biased around the svg icon vs font icon choice.
+import Icon from 'material-ui/Icon';
- <IconButton>comment</IconButton>
+ <IconButton>
+ <Icon>comment</Icon>
+ </IconButton>
[theme] Further simplification & standardization (#10015) @mbrookes
theme.palette.background colors have been removed. The affected components use theme.palette.grey instead. Shift the values of theme.palette.grey if you wish to lighten or darken these as a whole; this will maintain the contrast relationship between them. (Paper remains in the theme, as it is used across multiple components.)theme.palette.common.fullBlack and fullWhite have been removed. Components that used these values now use theme.palette.common.black and white instead.theme.palette.common.transparent has been removed. Components that used this value now use 'transparent' directly.theme.palette.grey. If you customize the values of grey, the appearance of Chip in your app may change.[core] Remove the rootRef properties as unneeded (#10025)
-import ReactDOM from 'react-dom';
<IconButton
- rootRef={node => {
- this.button = ReactDOM.findDOMNode(node);
+ buttonRef={node => {
+ this.button = node;
}}
>
-<Button dense>
+<Button size="small">
In order to keep the palette simple to understand. I have removed the types from the palette object.
The motivation is the following. The theme & palette should only store
the information needed to display one UI context.
Having the types object in the palette encourage people to rely on it.
No, we want people to do it the other way around.
For instance, instead of doing:
const theme = createMuiTheme({
palette: {
type: 'dark',
types: {
dark: {
background: {
default: '#000',
},
},
light: {
background: {
default: '#fff',
},
},
},
},
});
We would rather see people doing:
const types = {
dark: {
background: {
default: '#000',
},
},
light: {
background: {
default: '#fff',
},
},
};
const theme = createMuiTheme({
palette: {
type: 'dark',
...types.dark,
},
});
Big thanks to the 12 contributors who made this release possible.
Here are some highlights ✨:
-<Button color="contrast" />
+<Button />
Instead, you can use the color="inherit" property or use the theme.palette.XXX.contrastText value.
accent to secondary. We have removed the accent indirection to be closer to the object people are providing to customize the palette.-<Button color="accent" />
+<Button color="secondary" />
<Tabs
- indicatorColor="accent"
- textColor="accent"
+ indicatorColor="secondary"
+ textColor="secondary"
>
secondary to textSecondary. secondary and textSecondary are two valid color value.-<Typography color="secondary" />
+<Typography color="textSecondary" />
The secondary color now behaves the same way than the other colors (primary, error). We always use the main tone by default instead of the light tone.
It’s unclear if this change is making the implementation follow the specification more closely. The direct win is simplicity and predictability.
theme.palette.input object.theme.palette.text.icon color.theme.palette.background.contentFrame, it was only used in the documentation.theme.palette.text.divider to theme.palette.divider, it’s not a text color.theme.palette.text.lightDivider, there is no reference to is in the specification, better keep things simple.N/A
Big thanks to the 9 contributors who made this release possible.
We are making a release earlier than expected. The release schedule norm has been so far: one every weekend. 1.0.0-beta.28 has introduced important pain points we want to address quickly:
N/A
Big thanks to the 22 contributors who made this release possible.
Here are some highlights ✨:
It’s an important simplification of the palette system. You can now directly use the “official” Color Tool.
light, main, dark and contrastText.main value.import { createMuiTheme } from 'material-ui/styles';
import blue from 'material-ui/colors/blue';
import pink from 'material-ui/colors/pink';
const theme = createMuiTheme({
palette: {
- primary: blue,
- secondary: pink,
+ primary: {
+ light: blue[300],
+ main: blue[500],
+ dark: blue[700],
+ },
+ secondary: {
+ light: pink[300],
+ main: pink[500],
+ dark: pink[700],
+ }
type: theme.paletteType,
},
});
<ListItem
classes={{
- text: 'my-class',
+ textPrimary: 'my-class',
}}
/>
Rename ListItemText classes for consitancy with the CardHeader component:
-- `textPrimary`
-- `textSecondary`
+- `primary`
+- `secondary`
TableHead, TableBody and TableFooter no longer offer a CSS API, which means their root classes are no longer available.
To style the root element in these components, a className prop can be passed, as all non-API props will be spread to the root element.
Big thanks to the 19 contributors who made this release possible.
Here are some highlights ✨:
Remove the rootRef property from the Grow and List component.
Instead, you can use the ref property in combination with findDOMNode() or a RootRef helper.
transition property (#9682) @oliviertassinariRemove the transitionClasses property of the Popover component. Instead, you can provide a transition component.
-import BottomNavigation, { BottomNavigationButton } from 'material-ui/BottomNavigation';
+import BottomNavigation, { BottomNavigationAction } from 'material-ui/BottomNavigation';
You might be relying on the transitive dependency of Material-UI: jss-preset-default.
If you do, you need to declare the dependency in your package.json. Material-UI will no longer install it for you.
Alternatively, you can use our preset to save bundle size.
-import preset from 'jss-preset-default';
+import { jssPreset } from 'material-ui/styles';
Big thanks to the 12 contributors who made this release possible.
Here are some highlights ✨:
Reboot (#9661).Portal and Modal components have been revamped to solve the core issues raised by the community (#9613). Those components are now documented.Some properties have been renamed:
<Dialog
- ignoreBackdropClick
- ignoreEscapeKeyUp
+ disableBackdropClick
+ disableEscapeKeyDown
<Modal
- show
- disableBackdrop
- ignoreBackdropClick
- ignoreEscapeKeyUp
- modalManager
+ open
+ hideBackdrop
+ disableBackdropClick
+ disableEscapeKeyDown
+ manager
The zIndex object has been updated to match the usage.
const zIndex = {
- mobileStepper: 900,
- menu: 1000,
+ mobileStepper: 1000,
appBar: 1100,
- drawerOverlay: 1200,
- navDrawer: 1300,
- dialogOverlay: 1400,
- dialog: 1500,
- layer: 2000,
- popover: 2100,
- snackbar: 2900,
- tooltip: 3000,
+ drawer: 1200,
+ modal: 1300,
+ snackbar: 1400,
+ tooltip: 1500,
};
createBreakpoints.down() is now inclusive of the specified breakpointisWidthDown() is now inclusive of the specified breakpoint by default<Hidden /> will include the breakpoints associated with its Down properties regardless of whether CSS or JS is used.isMuiElement and isMuiComponent as typeguard (#9630) @SSW-SCIENTIFICBig thanks to the 16 contributors who made this release possible.
Here are some highlights ✨:
dangerouslyUseGlobalCSS option to the class name generator (#9558).
We discourage people from using this option in production.
However, it can be a quick escape hatch when prototyping.
It’s making the class names predictable, for instance:-c291
+MuiButton-raised
None, merry christmas 🎄.
masterial-ui to material-ui (#9544) @GinkoidBig thanks to the 16 contributors who made this release possible.
Here are some highlights ✨:
This change is making the js and css breakpoint utils behaving the same way.
The default parameter of withWidth.isWidthDown(breakpoint, width, inclusive) changed:
-inclusive = true
+inclusive = false
You might want to update the usage of the API by increasing the breakpoing used on the Hidden component:
-<Hidden implementation="js" mdDown>
+<Hidden implementation="js" lgDown>
Or by going back to the previous behavior:
-isWidthDown(breakpoint, width)
+isWidthDown(breakpoint, width, true)
Most of our components are stateless by default. It wasn’t the case with v0.x. Let’s translate this default behavior in the property names of v1.
-onRequestClose
-onRequestOpen
-onRequestDelete
+onClose
+onOpen
+onDelete
The existing InputProps property can be used to set the className on the input element, making inputClassName redundant. Issue #9508 exposed some conflicting behavior between the two properties and it was decided that removing inputClassName would result in a cleaner API.
- /**
- * The CSS class name of the `input` element.
- */
- inputClassName: PropTypes.string,
The configuration of the wrapped Input component and its input element should be done through InputProps. To specify a className on the input element:
<TextField InputProps={{ inputProps: { className: 'foo' } }} />
There is no logic attached to the optional boolean property. So, we can reduce the abstraction cost. The property is provided closer to where it’s needed, and people have full control over how it should be displayed. By chance, it matches the specification.
-<Step optional>
- <StepLabel>
+<Step>
+ <StepLabel optional={<Typography type="caption">Optional Text</Typography>}>
Label
</StepLabel>
</Step>
27bab80225) @oliviertassinarionly array support in the CSS implementation (#9457) @ChopinskyBig thanks to the 26 contributors who made this release possible.
Here are some highlights ✨:
inputProps | InputClassName). For advanced configuration any Input through TextField, use TextField.InputProps to pass any property accepted by the Input.<svg>. Instead, it’s used to apply normalized color.tslint.json “member-ordering” definition (#9359) @seivanBig thanks to the 26 contributors who made this release possible.
Here are some highlights ✨:
ExpansionPanel component with the help of the community. Big thanks to him!mui-org @hai-ceaIt’s a revert. I have made the unwise call of adding the InputClasses property in an unrelated refactorization pull request #8942. It was not taking the input classes property into account. It was a breaking change and not needed.
Big thanks to the 18 contributors who made this release possible.
Here are some highlights ✨:
v1-beta branch (#8291). Thank you!In the following diff SwitchBase can be a Checkbox a Radio or a Switch.
-<SwitchBase disabled disabledClassName={disabledClassName} />;
+<SwitchBase disabled classes={{ disabled: disabledClassName }} />;
bdf5b6600f) @oliviertassinariBig thanks to the 12 contributors who made this release possible.
Here are some highlights ✨:
ClickAwayListener component was made public (#8967).Input and FormLabel component do no longer inherit the font-size. You might have to override them explicitly.-Menu.classes.root
+Menu.classes.paper
-import { withResponsiveFullScreen } from 'material-ui/Dialog';
+import { withMobileDialog } from 'material-ui/Dialog';
disabled from FormControl (#8917) @nllarsonBig thanks to the 17 contributors who made this release possible.
Here are some highlights ✨:
withStyles() with react-hot-loader.
Thanks a lot @rrousselGit for the support (#8897). <Grow
- transitionDuration={{
+ timeout={{
enter: enterDuration,
exit: leaveDuration,
}}
/>
- <Dialog transition={<Slide direction="left" />} />;
+ const Transition = props => <Slide direction="left" {...props} />
+ <Dialog transition={Transition} />;
- <Snackbar transition={<Slide direction="left" />} />;
+ const Transition = props => <Slide direction="left" {...props} />
+ <Snackbar transition={Transition} />;
jss-rtl needs to be installed and added to jss by the users. We do no longer do it by default.f068f50187) @oliviertassinariBig thanks to the 14 contributors who made this release possible.
Here are some highlights ✨:
I have noticed one inconsistency with the className property.
The value should have been applied on the root of the component.
We enforce this behavior now.
rows property (#8740) @fathybBig thanks to the 14 contributors who made this release possible.
This release is mostly about stability. We have merged many bug fixes PRs and documentation improvement PRs. We are garbage collecting all the features we have been adding lately. As this garbage collection stabilize, we will be able to add new features, like a stepper, extension panel or date/time pickers. But we are not here yet. For instance, we need to upgrade all our dev dependencies to react@16 first.
- <Grid container xs={6} align="flex-end">
+ <Grid container xs={6} alignItems="flex-end">
<Grid item>
6172bd0af0) @oliviertassinariBig thanks to the 18 contributors who made this release possible.
Here are some highlights ✨:
withStyles() Higher-order Component (#8561) @pelotom and @sebald <TableFooter>
- <TablePagination
- count={data.length}
- rowsPerPage={rowsPerPage}
- page={page}
- onChangePage={this.handleChangePage}
- onChangeRowsPerPage={this.handleChangeRowsPerPage}
- />
+ <TableRow>
+ <TablePagination
+ count={data.length}
+ rowsPerPage={rowsPerPage}
+ page={page}
+ onChangePage={this.handleChangePage}
+ onChangeRowsPerPage={this.handleChangeRowsPerPage}
+ />
+ </TableRow>
</TableFooter>
baa37dee87) @oliviertassinariBig thanks to the 18 contributors who made this release possible.
- <TableCell checkbox>
+ <TableCell padding="checkbox">
- withTheme,
+ withTheme(),
<Dialog
- enterTransitionDuration={100}
- leaveTransitionDuration={100}
+ transitionDuration={100}
</Dialog>
<Dialog
- enterTransitionDuration={100}
- leaveTransitionDuration={200}
+ transitionDuration={{
+ enter: 100,
+ exit: 200,
+ }}
</Dialog>
getWidth as width with a spec (#8387) @rosskevincomponent property (#8376) @AndriusBilBreakpointsOptions in createBreakpoints (#8374) @peterpricecreateShallow typings (#8415) @sebaldwithStyle use cases (#8399) @sebaldBig thanks to the 25 contributors who made this release possible.
Wait, what?! We have been merging 52 pull requests from 25 different people in just 6 days (and closed 60 issues).
This is a new record for the project.
The v1-beta version is definitely getting traction.
Thanks for the support!
Here are some highlights ✨:
v0.x -> v1.x migration as well as a documentation page. @vividh (#8311, #8333, #8314)material-ui@next has just crossed react-toolbox in terms of downloads on npm.const muiTheme = createMuiTheme({
breakpoints: {
- breakpointsMap: {
+ values: {
xs: 360,
sm: 768,
md: 992,
lg: 1200,
xl: 1440,
},
},
});
paperWidthXs: {
- maxWidth: theme.breakpoints.getWidth('xs'),
+ maxWidth: theme.breakpoints.values.xs,
},
@pelotom did a great job improving the withStyles typings, such that less generics are required to be written! Most notably, you no longer have to pass a map of class names to withStyles:
- withStyles<{ root: string; }>(...)
+ withStyles(...)
Also, props can now be set when applying the HOC:
- const StyledComponent = withStyles<
- StyledComponentProps,
- StyledComponentClassNames
- >(styles)(Component);
+ const StyledComponent = withStyles(styles)<StyledComponentProps>(
+ ({ classes, text }) => (
+ <div className={classes.root}>
+ {text}
+ </div>
+ )
+ );
When withStyles() is used as a decorator and strictNullChecks is enabled, one has to use the ! operator to access classes from within the class.
resumeHideDuration property (#8272) @AndriusBilfullWidth property (#8329) @AndriusBil0c9936c40a) @oliviertassinariGrid to accept HTMLAttributes props (#8317) @michaelgruberBig thanks to the 12 contributors who made this release possible.
- <Tooltip label="Add">
+ <Tooltip title="Add">
withResponsiveFullScreen, Input + Select (#8214) @sebaldThis is an early release as we have been breaking the TypeScript typings with 1.0.0-beta.9. Hopefully, we are in a better state now. Here are some highlights:
Big thanks to the 13 contributors who made this release possible.
+import KeyboardArrowLeft from 'material-ui-icons/KeyboardArrowLeft';
+import KeyboardArrowRight from 'material-ui-icons/KeyboardArrowRight';
<MobileStepper
- onBack={this.handleBack}
- onNext={this.handleNext}
- disableBack={this.state.activeStep === 0}
- disableNext={this.state.activeStep === 5}
+ nextButton={
+ <Button dense onClick={this.handleNext} disabled={this.state.activeStep === 5}>
+ Next
+ <KeyboardArrowRight />
+ </Button>
+ }
+ backButton={
+ <Button dense onClick={this.handleBack} disabled={this.state.activeStep === 0}>
+ <KeyboardArrowLeft />
+ Back
+ </Button>
+ }
/>
button and a behavior the same (#8130) @oliviertassinaribackgroundPosition: 'center' to CardMedia (#8148) @kripodButtonBase (#8175) @sebaldwithStyles usable as decorator (#8178) @sebald51f40016e2) @oliviertassinariAgain, this release is particularly dense! Here are some highlights:
Big thanks to the 13 contributors who made this release possible.
N/A
image to CardMediaProps (#8033) @sebaldBottomNavigations onChange type (#8067) @sebaldfocusable (#8102) @NLincolnBig thanks to the 8 contributors who made this release possible.
N/A
styles (#7975) @sebaldtype property, remove docked property in TypeScript definition (#7998) @jaredklewiscd0f883325) @oliviertassinariThis release is particularly dense! Here are some highlights:
Big thanks to the 12 contributors who made this release possible.
const theme = createMuiTheme({
- palette: createPalette({ primary: deepOrange, accent: green }),
+ palette: createPalette({ primary: deepOrange, secondary: green }),
});
flatAccent: {
- color: theme.palette.accent.A200,
+ color: theme.palette.secondary.A200,
-<Drawer docked />
+<Drawer type="persistent" />
[theme] Simplification of the API (#7934) @oliviertassinari
material-ui/styles/theme, the path changed:-import createMuiTheme from 'material-ui/styles/theme';
+import createMuiTheme from 'material-ui/styles/createMuiTheme';
createMuiTheme(). Notice that you can still change the output object before providing it to the <MuiThemeProvider />. const theme = createMuiTheme({
- palette: createPalette({
+ palette: {
primary: blue,
secondary: pink,
}),
- typography: createTypography(palette, {
+ typography: {
// System font
fontFamily:
'-apple-system,system-ui,BlinkMacSystemFont,' +
'"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif',
- }),
+ },
-},
+});
[Input] Better support required field (#7955) @oliviertassinari
Following Bootstrap, we are now forwarding the required property down to the input component. We used to only apply aria-required. This move makes us less opinionated and should help with native form handling.
If you want to avoid the default browser required property handling, you can add a noValidate property to the parent form.
A big shout-out to @sebald for our first TypeScript coverage. Another notable change is the migration of the documentation to Next.js, it’s twice as fast as before 🚀.
Big thanks to the 9 contributors who made this release possible.
Push #7741 initiative forward (use value and onChange as controlling properties)
-<RadioGroup selectedValue="foo">
+<RadioGroup value="foo">
// ...
Big thanks to the 11 contributors who made this release possible.
This is an effort in the prolongation of #2957 where value/onChange is the idiomatic interface to control a component.
-<Tabs index={0}>
+<Tabs value={0}>
// ...
The primary motivation for this change is simplicity, it’s also making our interface closer to
react-jss.
-import { withStyles, createStyleSheet } from 'material-ui/styles';
+import { withStyles } from 'material-ui/styles';
-const styleSheet = createStyleSheet('Button', {
+const styles = {
root: {
background: 'red',
},
-});
+};
// ...
-export default withStyles(styleSheet)(AppContent);
+export default withStyles(styles, { name: 'Button' })(Button);
1f3e67326d) @oliviertassinariBig thanks to the 7 contributors who made this release possible.
Big thanks to the 8 contributors who made this release possible.
This release is full of bug fixes and documentation improvements following the major styling update of the previous release.
4deee4b5e3) @oliviertassinari4e2cf38ae3) @oliviertassinari5a88d950bb) @oliviertassinari91a30ee227) @oliviertassinaricd25e63a21) @oliviertassinari6f4b2b3b37) @oliviertassinariPublish a new version as v1.0.0-beta.1 was already used.
Big thanks to the 12 contributors who made this release possible.
This is the first beta release. We are proud to move to the next step after 7 months of dogfooding with the alpha releases. We have been fixing many bugs and implemented new features. The styling solution has also been greatly improved:
c1yMuiThemeProvidercreateStyleSheet API with an optional namereact-jssPlease keep in mind that semver won’t be respected between pre-releases. In other words, the API will change if we need to.
The styleManager is gone. The server-side rendering configuration changed, use the sheetManager instead. The documentation was updated, you can refer to it if needed.
<RadioGroup>
- <LabelRadio label="Male" value="male" />
+ <FormControlLabel value="male" control={<Radio />} label="Male" />
</RadioGroup>
This change provides more flexibility.
- <BottomNavigation index={index} onChange={this.handleChange}>
+ <BottomNavigation value={value} onChange={this.handleChange}>
Also plan to do the same for the Tabs in order to have a consistant API
where we always use value/onChange for controlled components.
-import { blue, fullWhite } from 'material-ui/styles/colors'
+import blue from 'material-ui/colors/blue'
+import common from 'material-ui/colors/common'
+const { fullWhite } = common
Do you like playing with bleeding-edge tech? We do, we have extended the support of React to the 16.0.0-alpha.13 release (aka Fiber).
21b67cec3b) @oliviertassinariThe previous v1.0.0-alpha.18 release is corrupted.
classes property over the removed xxxClassName.Big thanks to the 8 contributors who made this release possible.
-<Button contrast primary>Login</Button>
+<Button color="contrast">Login</Button>
This release is mainly about bug fixes and improving the documentation.
Shout out to @kybarg for the update of the TextField in order to better follow the spec (#6566).
false as a valid index value (#6945) @oliviertassinariThis release introduces an important change in the API and the implementation.
Each exposed component is wrapped with a withStyles Higher-order component.
This HOC has different responsibilities, the one you gonna be interested in is
regarding the classes property. Now, we consider the CSS as a public API.
You now have two way to customize absolutely all the CSS injected by Material-UI.
Either the instance level with the classes property or the class level with the
overrides theme property.
To learn more about it, have a look at the documentation.
innerRef or inputRef.withResponsiveFullScreen (#6898) @rosskevin-import { List, ListItem, ListItemText } from 'material-ui/List';
+import List, { ListItem, ListItemText } from 'material-ui/List';
-import Layout from 'material-ui/Layout';
+import Grid from 'material-ui/Grid';
only functionality (#6782) @rosskevinBig thanks to the 11 contributors who are pushing the next branch forward.
handleEntered() (#6616) @agamrafaelihandleEntering() (#6615) @agamrafaelihandleInputChange() (#6613) @agamrafaeli21751b2935) @oliviertassinarimuiThemeable as withTheme (#6610) @sxnshouldComponentUpdate() (#6680) @agamrafaeli4b5fedf902) @oliviertassinari6ad3354ec1) @oliviertassinarihandleExiting() (#6589) @agamrafaelihandleDocumentKeyUp() (#6588) @agamrafaelihandleRequestTimeout() (#6599) @agamrafaeliWe are continuing investing in the documentation and the test suite.
Visual regression tests are now sent to argos-ci. Thanks @agamrafaeli for increasing the test coverage of 1% since the last release (95.23%). Thanks @mbrookes for fixing the inconsistency of the API and improving the API.
// Paper
-rounded
+square
// BottomNavigation
-showLabel
+showLabels
// Button, IconButton, Switch
-ripple
+disableRipple
// Modal, Dialog
-backdropVisible
+backdropInvisible
-backdrop
+disableBackdrop
-hideOnBackdropClick
+ignoreBackdropClick
-hideOnEscapeKeyUp
+ignoreEscapeKeyUp
// Backdrop
-visible
+invisible
// ListItem
-gutters
+disableGutters
// InputLabel, TextFieldLabel
-animated
+disableAnimation
// TableCell, List
-padding
+disablePadding
// Inputn
-underline
+disableUnderline
// CardAction
-actionSpacing
+disableActionSpacing
// CardHeader
-subhead
+subheader
only() calling ‘xl’ (#6475) @agamrafaeli567a35ea3d) @oliviertassinari444c603925) @oliviertassinari8005d9d9b9) @oliviertassinarid13607581d) @oliviertassinariA big thanks to @agamrafaeli for increasing the test coverage by 4%. We are now at 93.53%. That’s pretty great.
getSlideDirection (#6388) @agamrafaelie7fba22bd1) @oliviertassinari03f0fdc627) @oliviertassinari9a220173a5) @oliviertassinari425d8ed47e) @oliviertassinari1831aa76fe) @nathanmarksOne year from now, we were struggling with removing all the mixins from the project. Now, it’s about rewriting all our components. We gonna try doing frequent alpha releases to keep some intertie. At least once per week would be good. As always, we are keeping the documentation up to date.
This is the first public alpha release. It’s still work in progress. You will be able to start giving us feedback with this release. Please keep in mind that semver won’t be respected between pre-releases. In other words, the API will change if we need to.
A big thanks to the 20 contributors who are making this release possible.
b7d9a37332) @oliviertassinarie017d365f4) @oliviertassinariWe are releasing sooner than we use to for this special day 🎄🎁. 17 contributors are making that last release of the year possible.
2016 has been an exceptional year for Material-UI.
That wouldn’t have been possible without this awesome community. Thank you!
But this’s just the beginning, some exciting stuff is coming in 2017 ✨.
You can preview a very early version of the next branch following this link.
svg-icons sub module (#5774)This is another release improving the stability of v0.16.x.
a12dca847a)v15.0.0 (417913e41f)This release is intended to solve an issue with react-tap-event-plugin following the release of React v15.4.0.
react-tap-event-plugin@^2.0.0 for react@^15.4.0 (#5572)This is another release improving the stability of v0.16.x while we are working on get next out of the door.
anchorEl (#5444)bf25bc1185)autoOk closing the dialog too early (#5511)string to node (#5474)0d375d6271)3e10f203bc)This is a small release improving the stability of v0.16.x.
2d99b2d66f)11639b02e6)selected initial value check to account for falsy value (#5342)c16147d9eb)This release contains a ton of bug fixes and small improvements 💥.
We have shifted goals for v0.16.0.
Across a number of issues over the last ~5 months we have been telling people that certain improvements are coming in v0.16.0 ranging from performance to component API issues and more.
Those improvements are coming with the next branch ✨.
We are switching in goal so we can release changes more often.
Regarding going forward, this is likely to be the last minor release using the inline-style approach.
We are migrating all the components to a CSS-in-JS approach on the next branch.
For more details, you can have a look a the next milestone as well as the next project
⚠️ New features based on the master branch (inline-style) have low priority and will most likely not be reviewed nor merged.
7e1d9d3d1d)7c0df3be32)size attribute now means the outer diameter in pixels. Line thickness is variable and should be defined via the thickness attribute. Default margins are eliminated. If you’d like to upgrade your existing app without changing the actual sizes of your CircularProgress components, here are the formulas:newSize = 59.5 * oldSize;
thickness = 3.5 * oldSize;
margin = (oldSize < 0.71) ?
((50 - 59.5 * oldSize) / 2) :
(5.25 * oldSize);
Examples:
// Before:
<CircularProgress />
<CircularProgress size={2} />
// After:
<CircularProgress size={59.5} style={{margin: 5.25}} /> // Thickness is 3.5 by default
<CircularProgress size={119} thickness={7} style={{margin: 10.5}} />
(#4705)
propTypes definitions so they can be removed in production (#4872)stage-1 dependencies of the examples (#4877)This release is mostly about bug fixes. All the new warnings introduced by React v15.2.1 and v15.3.0 should be addressed in this version.
labelColor being passed (#4766)During the release of 0.15.1 something went teribly wrong 😅 and some commits were left out even though they were mentioned in the changelog. This release includes the missing commits and some extra.
v15.2.0 (#4603, #4605, #4607)cursor:not-allowed style when disabled (#4170)Our support for IE and Safari improved in this release. Thanks @vizath, @hhaida, @nathanmarks and @aahan96 for their effort.
fullWidth regression (#4479)img instead of div (#4365)className prop is now set on the root element instead of being passed down (#4250)copy-webpack-plugin for dev (#4201)iconStyleLeft prop (#4266)weekTitleDayStyle (#4464)color property (#4025)floatingLabelFixed prop (#4392)StepButton event handlers (#4203)floatingLabelText intercepting click events (#4418)Please read through the alpha and beta releases of 0.15.0 too as their changes are not listed here.
withWidth HOC (#4126)containerStyle prop (#4085)padding and paddingTop (#4082)floatingLabelFocusStyle property (#4043)withWidth HOC (#4126)jsconfig.json - VSCode config file (#4011)error, hint, floatingLabel property validators to PropTypes.node (#4019)valueLink property (#3936)This release also ensures compatibility with React 15. You should update to this version if you need it.
This release changes how components are imported. You will need to update every import statement, Like:
import RaisedButton from 'material-ui/lib/raised-button';
import Tabs from 'material-ui/tabs/tabs';
import Tab from 'material-ui/tabs/tab';
to:
import RaisedButton from 'material-ui/RaisedButton';
import {Tabs, Tab} from 'material-ui/Tabs';
The exact import statements for each component can be found in their respective documentation page.
Have a ton of imports? almost had a heart attack? worry not, we also made a tool to ease your pain. checkout the readme.
As of now you will need to provide theme on context, see: https://v0.material-ui.com/#/customization/themes
index.js.You will probably need to turn
import Mui from 'material-ui';
into
import * as Mui from 'material-ui';
Although we discourage you to use this library like that.
rootClass with containerElement (#3783) (rootClass was broken before this change)material-ui-codemod package (#3782)onKeyDown property (#3853)grey400 to grey600 (#3938)TypeError when tabbing onto button (#3897).default to your requires (#3648):- const MUI = require('material-ui');
+ const MUI = require('material-ui').default;
If you used ES modules, you’re already all good:
import MUI from 'material-ui'; // no changes here :D
valueLink (#3699)package.json to prevent building the lib after install (#3632)MenuItem, Table and Tabs in docs (#3589)Card subcomponent properties (#3621)EnhancedButton unit test and tweak karma config (#3512)FlatButton unit test (#3541)Divider unit test (#3527)Paper unit tests (#3528)Slider unit tests (#3688)dataSource (#3662)openOnFocus and item click (#3669)canAutoPosition to false for Popover (#3620)title from injected node attributes (to avoid native tooltip) (#3534)onKeyboardFocus being called with nullified event object (#3616)disableTouchRipple (#3659)anchorEl when using prop ‘open’ (#3666)<noscript/> (#3647)backgroundColor prop which was previously ignored (#3515)style prop being ignored (#3608)floatingLabelFixed property (#3646)shouldComponentUpdate function (#3673)defaultValue overlays floatingLabelText on mount (#3450)wordings with cancelLabel and okLabel (#3412)This release includes huge improvements to the implementation of components and utility modules. The most important improvement is the removal of mixins from the library, thanks to the great efforts of @newoga 👍
There are also improvements to the unit testing infrastructure. We own this great improvement to @nathanmarks, thanks a lot 👍.
Please note that raw-themes are deprecated with no warning! they will be removed
from the code with the 0.16.0 release.
0.14.x. (#3108)getStyles functions from the components (#3351)window-listenable mixin (#3334)context-pure mixin (#3331)click-awayable mixin (#3360)key-code util (#3371)className is now set on the root element (#2310)className is now set on the root element (#3122)className and style are now set on the root element (#3322)import Colors from 'material-ui/lib/styles/colors'; import * as Colors from 'material-ui/lib/styles/colors';.window-listenable mixin from components (#3305) (Thanks to @newoga)isMounted() (#3437)maxSearchResults property (#3262)firstDayOfWeek (#3417)openImmediately regression (#3384)multiple property of Menu (#3223)useLayerForClickAway (#3400) (#3283)secondaryTextColor (#3288)_isChildSelected child not recognising first child (#3165)onMouseEnter and onMouseLeave (#3481)React.createClass (#3326)animated (#3216)style-propable mixin and utils/styles (#3351)ThemeDecorator in favor of MuiThemeProvider (#3267)theme-manager and raw-themes (#3267)Related Projects section (#3102)FlatButtons for tabs (#3051)disabled property (#3060)labelPosition (#3115)labelPosition (#3115)Note that these are not essentially breaking changes. Unless you have used these implementation details in your code.
controllable.js mixin (#2889)mergeAndPrefix() (#2886)utils/extend.js (#2933)utils/immutability-helper.js (#2907)DateTimeFormat polyfill to the example (#3024)arguments (#2876)for...of on table children (#2904)firstDayOfWeek and days abbreviations (#2899)className is ignored (#2723)disableKeyboardFocus (#3000)0.15.0 (#2994)react/jsx-indent (#2808)<a> element (#2708)errorText when using multiLine (#2742)The chagnes in 0.14.0-rc1 and o.14.0-rc2 are also included as part of this release.
Have a look at them as well.
menuItems, these components are now composable. (#2565)Popover animation from the component to increase flexibility (#2367)react-addons-test-utils package (#2401)preventDefault() when handling expansion (#2495)avatar property optional (#2397)checked property changes (#2464)overlayStyle property (#2431)width property (#2387)menuStyle property (#2389)Popover (#2150)open and onRequestChange properties (#2383)material-ui/lib/menu folder (#2443)actions property of Dialog accepting a JSON is deprecated (#2483)menuItems of LeftNav and all the related properties are now deprecated in favor of composibility (#2507)v0.12.4 should have really been v0.13.0 as it breaks compatibility with React 0.13.3. This version fixes that. We reverted some commits (related to React 0.14.0 support) from v0.12.4 to bring to you v0.12.5 that works as expected.
This version is not compatible with React 0.13.x. If you’re on React 0.13.x, use Material-UI v0.12.5 instead.
mui theme and raw theme, mui theme is produced from raw themeThemeManager has been changed, no longer needs new in callThemeManager produces mui theme from raw theme. Raw themes may be user-defined.ThemeManager allow to modify theme variables. Component-level styles may be overriden in the mui theme.getContextProps() has been changed to getRelevantContextKeys()react-tap-event-plugin (#1714)actions now has id propertyonChange event to: onChange(value, e, tab). Where value is the value of the tab that it was changed
to, e is the event, and tab is the actual tab component. (#1232, #1235)static flag to the ThemeManager that defaults to true. If you’re mutating your theme variables
after the app initializes, set this flag to false. This will allow us to perform some optimizations to
components that require theme variables. (#1397)nestedItems prop instead.open prop has been renamed to initiallyOpen.classnames
dependency. If you were using this mixin in your own projects, you’ll need to pull the source and manually
include it.disabled prop (#1406)labelPosition prop. (#1286)setContentFontFamily (#1405)date-picker/index.js to expose DatePicker and DatePickerDialog.
Hence require('material-ui/lib/date-picker') no longer works. Use
require('material-ui/lib/date-picker/date-picker') instead.closeOnItemTouchTap prop (#1156)errorText is now being passed down to underlying textField (#1131)inkBarStyle prop (#1154)errorStyle prop is now being properly merged (#1116)input.jsx file. This component was deprecated long ago, but was never removed from the project.button instead of the browser’s default of submit. We found that
most of the buttons in our apps were not submit buttons and it was more intuitive to default to button.
If you need a submit button, be sure to pass in a type of submit. (#1017)DialogWindow component was refactored into Dialog. DialogWindow was never documented and was just
a lower level component that was used by Dialog. It was, however, exposed on the main index.js and has
since been removed. If you were using DialogWindow before, you should be able to safely use
Dialog instead./lib/svg-icons directory and were not added to the main index.js
file. To use these icons, require them directly: require('material-ui/lib/svg-icons/action/face').
These icons were created using a script that crawls the icon repo and generates the
appropriate js and jsx files and can be found in the /icon-builder directory.require('material-ui/lib/menus/menu').DropDownIcon and has all of the new menu features mentioned above.size prop (#945)mediaStyle prop (#1004)color and innerStyle prop (#928)FontIcon and SvgIcon as children (#967, #894)material-icon ligatures (#952, #1007)zDepth prop.contentContainerStyle prop (#953)The following components have been modified to allow for style overrides: Radio Button Group, Radio Button, Enhanced Switch Label, Text Field, Toggle, Checkbox (#807)
We’ve cleaned up some of our click/tap events. (#771) Upgrade should be straight forward, please see below:
style prop. These
changes are applied to the root element of the component. If you are
overriding a nested element of the component, check the component’s
documentation and see if there is a style prop available for that nested
element. If a style prop does not exist for the component’s nested element
that you are trying to override, submit an issue
requesting to have it added.var FILENAME = require('material-ui').Styles.FILENAME;.
Material-UI has moved away from being a CSS Framework to being simply a
set of React components.var SvgIcon = require('material-ui/lib/svg-icon);/lib folder in Material-UI contains the file structure needed when referencing individual components.this.getDOMNode() with React.findDOMNode() (#558)process.NODE_ENV with process.env.NODE_ENV (#573)props is not defined error when onChange is invoked (#556)title prop to accept node types instead of just strings (#474)onShow and onDismiss props (#399)disable prop (#402)innerStyle prop (#418)initialSelectedIndex prop (#389)