MaterialΒ UI: Ready-to-use foundational React components, free forever. It includes Material UI, which implements Google's Material Design.
MIT License
Big 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/[email protected]
type
prop (#15096) @karlbohlmarkN/A
A big thanks to the 23 contributors who made this release possible!
Here are some highlights β¨:
@material-ui/[email protected]
[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.
People should use event.stopPropagation()
if they don't want to trigger a onClose
event on the modal.
@material-ui/[email protected]
A big thanks to the 17 contributors who made this release possible!
Here are some highlights β¨:
@material-ui/[email protected]
[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/[email protected]
@material-ui/[email protected]
A big thanks to the 14 contributors who made this release possible!
Here are some highlights β¨:
React.forwardRef()
(#14714, #14737, #14738, #14775) @eps1lon.@material-ui/[email protected]
[useMediaQuery] Remove unstable prefix (#14593)
-import { unstable_useMediaQuery as useMediaQuery } from '@material-ui/core/useMediaQuery';
+import useMediaQuery from '@material-ui/core/useMediaQuery';
[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/[email protected]
Remove 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/[email protected]
A big thanks to the 23 contributors who made this release possible!
Here are some highlights β¨:
@material-ui/[email protected]
[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/[email protected]
@material-ui/[email protected]
@material-ui/[email protected]
A big thanks to the 16 contributors who made this release possible!
Here are some highlights β¨:
@material-ui/[email protected]
[Typography] Remove deprecated Typography variants (#14562) @joshwooding
display: block
default typograpghy style.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/[email protected]
Remove 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/[email protected]
This 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/[email protected]
[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 county 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/[email protected]
@material-ui/[email protected]
@material-ui/[email protected]
@material-ui/[email protected]
@material-ui/[email protected]
-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/[email protected]
@material-ui/[email protected]
@material-ui/[email protected]
Big thanks to the 30 contributors who made this release possible!
Here are some highlights β¨:
@material-ui/[email protected]
home
and end
key support (#14212) @dallin-christensen@material-ui/[email protected]
@material-ui/[email protected]
@material-ui/[email protected]
Big thanks to the 17 contributors who made this release possible!
Here are some highlights β¨:
@material-ui/[email protected]
@material-ui/[email protected]
Big thanks to the 5 contributors who made this release possible!
We are making a quick release to fix an important TypeScript regression (#14117) @eps1lon.
@material-ui/[email protected]
InputBaseComponentProps
type (#14082) @franklixuefeiBig thanks to the 20 contributors who made this release possible!
Here are some highlights β¨:
@material-ui/[email protected]
@material-ui/[email protected]
@material-ui/[email protected]
@material-ui/[email protected]
@material-ui/[email protected]
@material-ui/[email protected]
@material-ui/[email protected]
@material-ui/[email protected]
@material-ui/[email protected]
@material-ui/[email protected]
@material-ui/[email protected]
Big thanks to the 15 contributors who made this release possible!
Here are some highlights β¨:
@material-ui/[email protected]
The 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/[email protected]
@material-ui/[email protected]
Big thanks to the 15 contributors who made this release possible!
Here are some highlights β¨:
@material-ui/[email protected]
Big thanks to the 11 contributors who made this release possible!
Here are some highlights β¨:
@material-ui/[email protected]
We 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/[email protected]
@material-ui/[email protected]
@material-ui/[email protected]
Big thanks to the 20 contributors who made this release possible!
Here are some highlights β¨:
@material-ui/[email protected]
@material-ui/[email protected]
@material-ui/[email protected]
Big 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/[email protected]
@material-ui/[email protected]
Big 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/[email protected]
The 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) @SerhiiBilyk@material-ui/[email protected]
@material-ui/[email protected]
@material-ui/[email protected]
Big 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/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/[email protected]
@material-ui/[email protected]