Add navigation menu component from Base UI#25
Merged
carlosabadia merged 5 commits intomainfrom Jul 15, 2025
Merged
Conversation
- Implement NavigationMenuBaseComponent extending BaseUIComponent - Add all navigation menu sub-components following existing patterns - Create HighLevelNavigationMenu wrapper for simple usage - Add to lazy loading system in __init__.py - Include example in demo application - Component renders and functions correctly with clickable buttons Co-Authored-By: Carlos Cutillas <carlos@reflex.dev>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
⚙️ Control Options:
|
…lar API - Removed HighLevelNavigationMenu class as requested - Updated demo to use ui.navigation_menu.root(), ui.navigation_menu.list(), etc. - Removed unused imports (foreach, button) - Fixed linting issues Co-Authored-By: Carlos Cutillas <carlos@reflex.dev>
- Add missing props to NavigationMenuRoot (delay, close_delay, actions_ref, on_open_change_complete) - Update all component prop descriptions to match Base UI documentation exactly - Create comprehensive demo with Overview and Handbook dropdowns - Add rich content with links, titles, and descriptions - Update ClassNames for better styling and transitions - Include Portal structure for proper positioning - Fix syntax error: use rx.el instead of rx.html for HTML elements Co-Authored-By: Carlos Cutillas <carlos@reflex.dev>
carlosabadia
approved these changes
Jul 15, 2025
carlosabadia
added a commit
that referenced
this pull request
Jul 15, 2025
* Add navigation menu component from Base UI - Implement NavigationMenuBaseComponent extending BaseUIComponent - Add all navigation menu sub-components following existing patterns - Create HighLevelNavigationMenu wrapper for simple usage - Add to lazy loading system in __init__.py - Include example in demo application - Component renders and functions correctly with clickable buttons Co-Authored-By: Carlos Cutillas <carlos@reflex.dev> * Remove HighLevelNavigationMenu component and update demo to use granular API - Removed HighLevelNavigationMenu class as requested - Updated demo to use ui.navigation_menu.root(), ui.navigation_menu.list(), etc. - Removed unused imports (foreach, button) - Fixed linting issues Co-Authored-By: Carlos Cutillas <carlos@reflex.dev> * Enhance navigation menu demo to match Base UI example - Add missing props to NavigationMenuRoot (delay, close_delay, actions_ref, on_open_change_complete) - Update all component prop descriptions to match Base UI documentation exactly - Create comprehensive demo with Overview and Handbook dropdowns - Add rich content with links, titles, and descriptions - Update ClassNames for better styling and transitions - Include Portal structure for proper positioning - Fix syntax error: use rx.el instead of rx.html for HTML elements Co-Authored-By: Carlos Cutillas <carlos@reflex.dev> * fixes * comment pre --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Carlos Cutillas <carlos@reflex.dev> Co-authored-by: carlosabadia <cutillascarlos@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enhanced Navigation Menu Demo to Match Base UI Example
Summary
This PR enhances the navigation menu component implementation to more closely match the Base UI documentation example. The changes include:
NavigationMenuRootcomponent (delay,close_delay,actions_ref,on_open_change_complete)rx.htmltorx.elfor HTML elementsThe demo now showcases a realistic navigation menu with:
Review & Testing Checklist for Human
Recommended test plan: Run
uv run reflex runin the demo directory, navigate to localhost:3000, and thoroughly test all navigation menu interactions including hover states, click handlers, and visual appearance.Diagram
%%{ init : { "theme" : "default" }}%% graph TD A["reflex_ui/components/base/navigation_menu.py<br/>NavigationMenu Implementation"]:::major-edit B["demo/demo/demo.py<br/>Demo Application"]:::major-edit C["reflex_ui/__init__.py<br/>Component Registry"]:::context D["Base UI Documentation<br/>@base-ui-components/react"]:::context A --> B C --> A D --> A A --> E["NavigationMenuRoot<br/>Added missing props"]:::minor-edit A --> F["Component Descriptions<br/>Updated to match Base UI"]:::minor-edit A --> G["ClassNames<br/>Enhanced styling"]:::minor-edit B --> H["Overview Dropdown<br/>Quick Start, Accessibility, Releases"]:::major-edit B --> I["Handbook Dropdown<br/>Styling, Animation"]:::major-edit B --> J["GitHub Link<br/>Direct navigation"]:::major-edit subgraph Legend L1[Major Edit]:::major-edit L2[Minor Edit]:::minor-edit L3[Context/No Edit]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFFNotes