express.ui.navset_hidden(id=None, selected=None, header=None, footer=None)

Context manager for nav contents without the nav items.

This function wraps navset_hidden.


id: Optional[str] = None

If provided, will create an input value that holds the currently selected nav item.

selected: Optional[str] = None

Choose a particular nav item to select by default value (should match it’s value).

header: TagChild = None

UI to display above the selected content.

footer: TagChild = None

UI to display below the selected content.


#| standalone: true
#| components: [editor, viewer]
#| layout: vertical
#| viewerHeight: 400

## file:
from shiny import reactive
from import input, ui

with ui.sidebar():
    ui.input_radio_buttons("controller", "Controller", ["1", "2", "3"], selected="1")

with ui.navset_hidden(id="hidden_tabs"):
    with ui.nav_panel(None, value="panel1"):
        "Panel 1 content"
    with ui.nav_panel(None, value="panel2"):
        "Panel 2 content"
    with ui.nav_panel(None, value="panel3"):
        "Panel 3 content"

def _():
    ui.update_navs("hidden_tabs", selected="panel" + str(input.controller()))