Skip to content

fix: preserve scoped themes in shadcn portals - #397

Closed
fzdwx wants to merge 1 commit into
vercel-labs:mainfrom
fzdwx:codex/shadcn-portal-container
Closed

fzdwx wants to merge 1 commit into
vercel-labs:mainfrom
fzdwx:codex/shadcn-portal-container

Conversation

@fzdwx

@fzdwx fzdwx commented Oct 16, 2026

Copy link
Copy Markdown

Shadcn dialogs, menus, popovers, selects and tooltips currently portal to document.body, so a renderer inside a scoped theme loses its font and theme variables when an overlay opens.

Add PortalContainerProvider to forward the nearest host-owned element to the existing Radix portals. Without a provider, the default body container remains unchanged. Component schemas, bindings, state and actions are unchanged. Package docs, API docs and the integration skill describe ownership and clipping considerations.

Validation:

  • Rebuilt the exact v0.21.0 package with these source changes: ESM, CJS and declaration builds passed.
  • Downstream local Chrome: 36 component and interaction checks passed, including nested dialog keyboard containment.
  • Light/dark App, public share and fully offline file export portal checks passed.
  • Full workspace type-check was not completed: pnpm attempted to install the entire workspace in the isolated checkout; the install was stopped. No workspace-wide type-check pass is claimed.

@vercel

vercel Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

@fzdwx is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@fzdwx fzdwx closed this Oct 16, 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