Skip to content

Allow specify portal destination for all portaled components #3687

@menthol

Description

@menthol

Currently, portal components (modals, popovers, etc.) are directly attached to the root of the body. It would be beneficial to allow specifying their destination within the configuration .This would provide greater control over rendering order and potential styling conflicts, especially in complex applications with open shadow Dom.

For instance, a developer might want to render a modal within a specific container to inherit styles or avoid interference with other elements on the page (I currently using Nuxt ui as a web component withing WordPress).

The proposed configuration option could be a CSS selector string, allowing for flexible targeting of any existing element in the DOM defaulting to 'body'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    v3#1289

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions