Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NavigationMenu] Add Portal #3272

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zephyr-dassouli
Copy link

Description

Overview

This pull request introduces the Portal feature to the NavigationMenu component (in response to the #3159 issue), addressing common issues caused by overflow: hidden styles in parent containers. By rendering NavigationMenuContent in a Portal, this change ensures that dropdowns or menus within the component are not clipped or hidden, particularly in fixed-height navigation bars or headers with hidden overflow.

Key Changes

  • Integrated a Portal component into NavigationMenu, similar to existing implementations in Dialog, DropdownMenu, and Popover.
  • Added a Storybook example to reflect the change

This change aligns NavigationMenu with other primitives like Dialog and DropdownMenu, improving usability and ensuring consistency. It benefits all users working with headers or navigation bars with constrained overflow properties, ensuring dropdowns display correctly without additional configuration.

Impact

Users: Enhances usability for any developers integrating NavigationMenu in constrained layouts.
Consistency: Brings feature parity with similar Radix UI primitives.

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.

2 participants