Skip to content

[material-ui] Add the component prop to CardActions, DialogContent, DialogActions and AccordionDetails - #49361

Draft
Janpot wants to merge 1 commit into
mui:masterfrom
Janpot:feat/material-component-prop-siblings
Draft

Janpot wants to merge 1 commit into
mui:masterfrom
Janpot:feat/material-component-prop-siblings

Conversation

@Janpot

@Janpot Janpot commented Oct 7, 2026

Copy link
Copy Markdown
Member

CardActions, DialogContent, DialogActions and AccordionDetails didn't support the component prop, while their siblings CardContent, DialogTitle and AccordionSummary do. A component passed to them was forwarded to the root <div> as an unknown attribute.

They now render their root through as={component} and are typed as OverridableComponent, following CardContent. With component="form", for example, TypeScript accepts form props such as onSubmit, which is a common need for DialogContent and DialogActions inside a form dialog.

XProps changes from an interface to a type alias with optional generics, the same shape as CardContentProps, so existing uses of CardActionsProps and the others keep working.

Part of #49337

@Janpot Janpot added the type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. label Oct 7, 2026
@code-infra-dashboard

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-49361--material-ui.netlify.app/
QR code for https://deploy-preview-49361--material-ui.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/material 🔺+145B(+0.03%) 🔺+30B(+0.02%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/private-theming 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant