Skip to content

Conversation

@metonym
Copy link
Collaborator

@metonym metonym commented Apr 13, 2025

WIP to add portal support using Floating UI.

Why?

Currently, "popover" elements (dropdown menus, tooltips, modals etc..) are relative positioned, meaning that the element is contained within the component in the DOM. This causes z-index issues, where other elements may obstruct menus. Additionally, elements may be cut-off if an ancestor component manipulates overflow: hidden.

See issues tagged with "portal": https://github.com/carbon-design-system/carbon-components-svelte/issues?q=is%3Aissue%20state%3Aopen%20label%3Aportal

This is where a portal helps. It's a standard feature of UI, where "popover" elements are "portalled" outside of the root node for the main application. The portalled node is typically a sibling of the app node.

Proposed Changes

  • Breaking change: apply a floating portal approach to all "popover" elements.
  • Feature: add Portal and FloatingPortal components.

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