Skip to content

Commit 43173c6

Browse files
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 <[email protected]>
1 parent 892c9c3 commit 43173c6

File tree

3 files changed

+419
-0
lines changed

3 files changed

+419
-0
lines changed

demo/demo/demo.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ def index() -> rx.Component:
5858
on_value_change=lambda value: rx.toast.success(f"Value: {value}"),
5959
on_open_change=lambda value: rx.toast.success(f"Open: {value}"),
6060
),
61+
ui.navigation_menu(
62+
items=[
63+
("Home", lambda: rx.toast.success("Home clicked")),
64+
("About", lambda: rx.toast.success("About clicked")),
65+
("Contact", lambda: rx.toast.success("Contact clicked")),
66+
],
67+
),
6168
ui.theme_switcher(class_name="absolute top-4 right-4"),
6269
class_name=ui.cn(
6370
"flex flex-col gap-6 items-center justify-center h-screen", "bg-secondary-1"

reflex_ui/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"components.base.input": ["input"],
1414
"components.base.link": ["link"],
1515
"components.base.menu": ["menu"],
16+
"components.base.navigation_menu": ["navigation_menu"],
1617
"components.base.popover": ["popover"],
1718
"components.base.scroll_area": ["scroll_area"],
1819
"components.base.select": ["select"],

0 commit comments

Comments
 (0)