Skip to content

feat(components): add keepMounted prop to DialogContent#10499

Open
Saikat-D023 wants to merge 1 commit intoshadcn-ui:mainfrom
Saikat-D023:new-contribution
Open

feat(components): add keepMounted prop to DialogContent#10499
Saikat-D023 wants to merge 1 commit intoshadcn-ui:mainfrom
Saikat-D023:new-contribution

Conversation

@Saikat-D023
Copy link
Copy Markdown

@Saikat-D023 Saikat-D023 commented Apr 26, 2026

Summary

Adds a keepMounted prop to DialogContent, passing it through to DialogPortal.

Problem

In Base UI dialogs, the content is unmounted when closed, which causes issues in scenarios where the DOM needs to persist (e.g. state reset, animations, or integrations relying on mounted elements).

Solution

Expose a keepMounted prop on DialogContent so consumers can control this behavior.

Notes

  • Applied consistently across base-* styles
  • Added example usage in docs

Related to #10483

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 26, 2026

@Saikat-D023 is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

@Saikat-D023 Saikat-D023 reopened this Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant