ui.nav_menu(title, *args, value=None, icon=None, align='left')

Create a menu of nav items.


title: TagChild

A title to display. Can be a character string or UI elements (i.e., tags).

*args: NavPanel | str = ()

A collection of nav items (e.g., nav_panel) and/or strings. Strings will be rendered as a section header unless the string is a set of two or more hyphens (e.g., ---), in which case it will be rendered as a divider.

value: Optional[str] = None

The value of the item. Use this value to determine whether the item is active (when an id is provided to the nav container) or to programmatically select the item (e.g., update_navs). You can also provide the value to the selected argument of the navigation container (e.g., navset_tab).

icon: TagChild = None

An icon to appear inline with the button/link.

align: Literal[‘left’, ‘right’] = ‘left’

Horizontal alignment of the dropdown menu relative to dropdown toggle.


Type Description
NavMenu A UI element representing both the navigation menu.

See Also


See nav_panel