Skip to content
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
3c2c967
[material-ui][system] Remove deprecated system props from Box, Stack,…
siriwatknp Mar 23, 2026
a1af3e0
move raw CSS color value to sx in ListItemText secondary slotProps
siriwatknp Mar 23, 2026
f3a9123
Merge remote-tracking branch 'upstream/master' into worktree-remove-s…
siriwatknp Mar 24, 2026
981c6e7
Move remaining Typography color system props to sx
siriwatknp Mar 24, 2026
15b41dd
Move remaining system props to sx (codemod pass)
siriwatknp Mar 24, 2026
48e9bf7
Move system props to sx in Blog template
siriwatknp Mar 24, 2026
427c447
Add TimelineOppositeContent to system props codemod, fix Blog and Tim…
siriwatknp Mar 24, 2026
bb35ec5
update docs
siriwatknp Mar 24, 2026
d282c68
Revert zero-styled/index.tsx changes
siriwatknp Mar 24, 2026
979b909
Prevent proptypes expansion of ListItemText slotProps
siriwatknp Mar 24, 2026
84184f6
Remove v6Colors and isSxColor check from Typography
siriwatknp Mar 24, 2026
d529a73
Remove (string & {}) from Typography color type
siriwatknp Mar 24, 2026
ec17865
Add DialogContentText to system props codemod
siriwatknp Mar 24, 2026
5c68d16
Move system props to sx in InfoCard
siriwatknp Mar 24, 2026
0ea9858
Fix codemod to move color="inherit" to sx, run on remaining demos
siriwatknp Mar 24, 2026
c4c0b53
Regenerate DenseAppBar preview
siriwatknp Mar 24, 2026
63c00e5
Fix TypeScript errors: move color="inherit" to sx in specs, add inher…
siriwatknp Mar 24, 2026
4073819
Move color="inherit" to sx in onepirate theme Typography usages
siriwatknp Mar 24, 2026
172032b
Update Link codemod to move system prop colors to sx, fix Link demos
siriwatknp Mar 24, 2026
caa6094
Update system props codemod tests for inherit and Link color
siriwatknp Mar 24, 2026
a6cf00a
Move updated system-props codemod to v9.0.0, revert v6.0.0
siriwatknp Mar 24, 2026
6471fe5
Add DialogContentText, TimelineContent, TimelineOppositeContent test …
siriwatknp Mar 24, 2026
91d6ee3
revert color type
siriwatknp Mar 24, 2026
0ea45da
fix Footer
siriwatknp Mar 24, 2026
886a37c
remove unnessary test
siriwatknp Mar 24, 2026
4f577bb
update docs
siriwatknp Mar 24, 2026
f62ca93
udpate readme
siriwatknp Mar 24, 2026
046ba05
Merge branch 'master' of github.com:mui/material-ui into worktree-rem…
siriwatknp Mar 24, 2026
0c2d7ed
update guide
siriwatknp Mar 24, 2026
88ec496
add ignore proptypes to prevent bloated
siriwatknp Mar 24, 2026
cad25c7
Fix optional chaining in codemod color matchers for dynamic values
siriwatknp Mar 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/data/material/components/app-bar/DenseAppBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ export default function DenseAppBar() {
<IconButton edge="start" color="inherit" aria-label="menu" sx={{ mr: 2 }}>
<MenuIcon />
</IconButton>
<Typography variant="h6" color="inherit" component="div">
<Typography
variant="h6"
component="div"
sx={{
color: 'inherit',
}}
>
Photos
</Typography>
</Toolbar>
Expand Down
8 changes: 7 additions & 1 deletion docs/data/material/components/app-bar/DenseAppBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ export default function DenseAppBar() {
<IconButton edge="start" color="inherit" aria-label="menu" sx={{ mr: 2 }}>
<MenuIcon />
</IconButton>
<Typography variant="h6" color="inherit" component="div">
<Typography
variant="h6"
component="div"
sx={{
color: 'inherit',
}}
>
Photos
</Typography>
</Toolbar>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
<IconButton edge="start" color="inherit" aria-label="menu" sx={{ mr: 2 }}>
<MenuIcon />
</IconButton>
<Typography variant="h6" color="inherit" component="div">
<Typography
variant="h6"
component="div"
sx={{
color: 'inherit',
}}
>
Photos
</Typography>
</Toolbar>
Expand Down
14 changes: 0 additions & 14 deletions docs/data/material/components/box/box.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,11 @@ The demo below replaces the `<div>` with a `<section>` element:

## Customization

### With the sx prop

Use the [`sx` prop](/system/getting-started/the-sx-prop/) to quickly customize any Box instance using a superset of CSS that has access to all the style functions and theme-aware properties exposed in the MUI System package.
The demo below shows how to apply colors from the theme using this prop:

{{"demo": "BoxSx.js", "defaultCodeOpen": true }}

### With MUI System props

:::info
System props are deprecated and will be removed in the next major release. Please use the `sx` prop instead.

```diff
- <Box mt={2} />
+ <Box sx={{ mt: 2 }} />
```

:::

## Anatomy

The Box component is composed of a single root `<div>` element:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ export default function ActiveLastBreadcrumb() {
</Link>
<Link
underline="hover"
color="text.primary"
href="/material-ui/react-breadcrumbs/"
aria-current="page"
sx={{
color: 'text.primary',
}}
>
Breadcrumbs
</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ export default function ActiveLastBreadcrumb() {
</Link>
<Link
underline="hover"
color="text.primary"
href="/material-ui/react-breadcrumbs/"
aria-current="page"
sx={{
color: 'text.primary',
}}
>
Breadcrumbs
</Link>
Expand Down
18 changes: 11 additions & 7 deletions docs/data/material/components/buttons/ButtonBaseDemo.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,17 @@ export default function ButtonBaseDemo() {
<Typography
component="span"
variant="subtitle1"
color="inherit"
sx={(theme) => ({
position: 'relative',
p: 4,
pt: 2,
pb: `calc(${theme.spacing(1)} + 6px)`,
})}
sx={[
{
color: 'inherit',
},
(theme) => ({
position: 'relative',
p: 4,
pt: 2,
pb: `calc(${theme.spacing(1)} + 6px)`,
}),
]}
>
{image.title}
<ImageMarked className="MuiImageMarked-root" />
Expand Down
18 changes: 11 additions & 7 deletions docs/data/material/components/buttons/ButtonBaseDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,17 @@ export default function ButtonBaseDemo() {
<Typography
component="span"
variant="subtitle1"
color="inherit"
sx={(theme) => ({
position: 'relative',
p: 4,
pt: 2,
pb: `calc(${theme.spacing(1)} + 6px)`,
})}
sx={[
{
color: 'inherit',
},
(theme) => ({
position: 'relative',
p: 4,
pt: 2,
pb: `calc(${theme.spacing(1)} + 6px)`,
}),
]}
>
{image.title}
<ImageMarked className="MuiImageMarked-root" />
Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/components/cards/SelectActionCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function SelectActionCard() {
<Typography variant="h5" component="div">
{card.title}
</Typography>
<Typography variant="body2" color="text.secondary">
<Typography variant="body2" sx={{ color: 'text.secondary' }}>
{card.description}
</Typography>
</CardContent>
Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/components/cards/SelectActionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function SelectActionCard() {
<Typography variant="h5" component="div">
{card.title}
</Typography>
<Typography variant="body2" color="text.secondary">
<Typography variant="body2" sx={{ color: 'text.secondary' }}>
{card.description}
</Typography>
</CardContent>
Expand Down
28 changes: 16 additions & 12 deletions docs/data/material/components/lists/CustomizedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ export default function CustomizedList() {
primary="Firebash"
slotProps={{
primary: {
fontSize: 20,
fontWeight: 'medium',
letterSpacing: 0,
sx: { fontSize: 20, fontWeight: 'medium', letterSpacing: 0 },
},
}}
/>
Expand All @@ -87,7 +85,7 @@ export default function CustomizedList() {
slotProps={{
primary: {
color: 'primary',
fontWeight: 'medium',
sx: { fontWeight: 'medium' },
variant: 'body2',
},
}}
Expand Down Expand Up @@ -184,16 +182,20 @@ export default function CustomizedList() {
secondary="Authentication, Firestore Database, Realtime Database, Storage, Hosting, Functions, and Machine Learning"
slotProps={{
primary: {
fontSize: 15,
fontWeight: 'medium',
lineHeight: '20px',
mb: '2px',
sx: {
fontSize: 15,
fontWeight: 'medium',
lineHeight: '20px',
mb: '2px',
},
},
secondary: {
noWrap: true,
fontSize: 12,
lineHeight: '16px',
color: open ? 'rgba(0,0,0,0)' : 'rgba(255,255,255,0.5)',
sx: {
fontSize: 12,
lineHeight: '16px',
color: open ? 'rgba(0,0,0,0)' : 'rgba(255,255,255,0.5)',
},
},
}}
sx={{ my: 0 }}
Expand Down Expand Up @@ -226,7 +228,9 @@ export default function CustomizedList() {
</ListItemIcon>
<ListItemText
primary={item.label}
slotProps={{ primary: { fontSize: 14, fontWeight: 'medium' } }}
slotProps={{
primary: { sx: { fontSize: 14, fontWeight: 'medium' } },
}}
/>
</ListItemButton>
))}
Expand Down
28 changes: 16 additions & 12 deletions docs/data/material/components/lists/CustomizedList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ export default function CustomizedList() {
primary="Firebash"
slotProps={{
primary: {
fontSize: 20,
fontWeight: 'medium',
letterSpacing: 0,
sx: { fontSize: 20, fontWeight: 'medium', letterSpacing: 0 },
},
}}
/>
Expand All @@ -87,7 +85,7 @@ export default function CustomizedList() {
slotProps={{
primary: {
color: 'primary',
fontWeight: 'medium',
sx: { fontWeight: 'medium' },
variant: 'body2',
},
}}
Expand Down Expand Up @@ -184,16 +182,20 @@ export default function CustomizedList() {
secondary="Authentication, Firestore Database, Realtime Database, Storage, Hosting, Functions, and Machine Learning"
slotProps={{
primary: {
fontSize: 15,
fontWeight: 'medium',
lineHeight: '20px',
mb: '2px',
sx: {
fontSize: 15,
fontWeight: 'medium',
lineHeight: '20px',
mb: '2px',
},
},
secondary: {
noWrap: true,
fontSize: 12,
lineHeight: '16px',
color: open ? 'rgba(0,0,0,0)' : 'rgba(255,255,255,0.5)',
sx: {
fontSize: 12,
lineHeight: '16px',
color: open ? 'rgba(0,0,0,0)' : 'rgba(255,255,255,0.5)',
},
},
}}
sx={{ my: 0 }}
Expand Down Expand Up @@ -226,7 +228,9 @@ export default function CustomizedList() {
</ListItemIcon>
<ListItemText
primary={item.label}
slotProps={{ primary: { fontSize: 14, fontWeight: 'medium' } }}
slotProps={{
primary: { sx: { fontSize: 14, fontWeight: 'medium' } },
}}
/>
</ListItemButton>
))}
Expand Down
4 changes: 1 addition & 3 deletions docs/data/material/components/material-icons/SearchIcons.js
Original file line number Diff line number Diff line change
Expand Up @@ -615,9 +615,7 @@ export default function SearchIcons() {
}}
>
<Form>
<Typography fontWeight={500} sx={{ mb: 1 }}>
Filter the style
</Typography>
<Typography sx={{ fontWeight: 500, mb: 1 }}>Filter the style</Typography>
<RadioGroup
value={theme}
onChange={(event) => setTheme(event.target.value)}
Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/components/progress/CircularSize.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import CircularProgress from '@mui/material/CircularProgress';

export default function CircularSize() {
return (
<Stack spacing={2} direction="row" alignItems="center">
<Stack spacing={2} direction="row" sx={{ alignItems: 'center' }}>
<CircularProgress size="30px" />
<CircularProgress size={40} />
<CircularProgress size="3rem" />
Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/components/progress/CircularSize.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import CircularProgress from '@mui/material/CircularProgress';

export default function CircularSize() {
return (
<Stack spacing={2} direction="row" alignItems="center">
<Stack spacing={2} direction="row" sx={{ alignItems: 'center' }}>
<CircularProgress size="30px" />
<CircularProgress size={40} />
<CircularProgress size="3rem" />
Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/components/slider/MusicPlayerSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ export default function MusicPlayerSlider() {
spacing={2}
direction="row"
sx={(theme) => ({
alignItems: 'center',
mb: 1,
px: 1,
'& > svg': {
Expand All @@ -205,7 +206,6 @@ export default function MusicPlayerSlider() {
}),
},
})}
alignItems="center"
>
<VolumeDownRounded />
<Slider
Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/components/slider/MusicPlayerSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ export default function MusicPlayerSlider() {
spacing={2}
direction="row"
sx={(theme) => ({
alignItems: 'center',
mb: 1,
px: 1,
'& > svg': {
Expand All @@ -205,7 +206,6 @@ export default function MusicPlayerSlider() {
}),
},
})}
alignItems="center"
>
<VolumeDownRounded />
<Slider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ export default function FabIntegrationSnackbar() {
>
<MenuIcon />
</IconButton>
<Typography variant="h6" color="inherit" component="div">
<Typography
variant="h6"
component="div"
sx={{
color: 'inherit',
}}
>
App bar
</Typography>
</Toolbar>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ export default function FabIntegrationSnackbar() {
>
<MenuIcon />
</IconButton>
<Typography variant="h6" color="inherit" component="div">
<Typography
variant="h6"
component="div"
sx={{
color: 'inherit',
}}
>
App bar
</Typography>
</Toolbar>
Expand Down
13 changes: 5 additions & 8 deletions docs/data/material/components/stack/stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,15 @@ Below is an interactive demo that lets you explore the visual results of the dif

{{"demo": "InteractiveStack.js", "hideToolbar": true, "bg": true}}

## System props
## Customization

:::info
System props are deprecated and will be removed in the next major release. Please use the `sx` prop instead.
Use the [`sx` prop](/system/getting-started/the-sx-prop/) to quickly customize any Stack instance using a superset of CSS that has access to all the style functions and theme-aware properties exposed in the MUI System package.
Below is an example of how to apply center align items using this prop:

```diff
- <Stack mt={2} />
+ <Stack sx={{ mt: 2 }} />
```jsx
<Stack sx={{ alignItems: 'center' }} />
```

:::

## Limitations

### Margin on the children
Expand Down
Loading
Loading