Skip to content

[docs] Clarify container prop inheritance for Shadow DOM#48670

Open
Juan-C-Ceballos wants to merge 4 commits into
mui:masterfrom
Juan-C-Ceballos:docs/shadow-dom-container-inheritance
Open

[docs] Clarify container prop inheritance for Shadow DOM#48670
Juan-C-Ceballos wants to merge 4 commits into
mui:masterfrom
Juan-C-Ceballos:docs/shadow-dom-container-inheritance

Conversation

@Juan-C-Ceballos

Copy link
Copy Markdown

Summary

Clarifies the Shadow DOM customization page to explain why the container
default only needs to be set on Modal, Popover, and Popper.

The previous wording ("components like Menu, Dialog, Popover, and others")
left two things unclear, both raised in the linked issue:

  • Which components actually need container set.
  • Whether higher-level components (e.g. Dialog, Menu) inherit the default
    from the base component they render internally, or need it set separately.

This adds a short paragraph plus an info callout explaining that Dialog,
Drawer, Menu, Tooltip, and Autocomplete render one of the three base
components internally, and each base component reads its own default props
(MuiModal / MuiPopover / MuiPopper) at render time. So the existing
example is already complete and there's no need to set MuiDialog, MuiMenu,
etc.

Docs-only change.

Closes #48292

@code-infra-dashboard

code-infra-dashboard Bot commented Jun 15, 2026

Copy link
Copy Markdown

Deploy preview

Bundle size

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@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.

@mj12albert mj12albert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO the callout is a bit excessive and overall this could be explained within 1-2 sentences.

@mj12albert mj12albert added the docs Improvements or additions to the documentation. label Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to the documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[docs] Unclear documentation for container prop when using Shadow DOM

2 participants