Navigation Menu¶
marimo.nav_menu
¶
nav_menu(
menu: dict[str, JSONType],
*,
orientation: Literal[
"horizontal", "vertical"
] = "horizontal"
) -> Html
Navigation menu component.
This is useful for creating a navigation menu with hyperlinks,
most used when creating multi-page applications, with
marimo.create_asgi_app
(docs).
RETURNS | DESCRIPTION |
---|---|
Html
|
An |
Example
nav_menu = mo.nav_menu(
{
"/overview": "Overview",
"/sales": f"{mo.icon('lucide:shopping-cart')} Sales",
"/products": f"{mo.icon('lucide:package')} Products",
}
)