Skip to content

Conversation

@zephyrdassouli
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.

@zephyrdassouli zephyrdassouli closed this by deleting the head repository Apr 22, 2025
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