ui.navset_hidden
Render nav contents without the nav items.
Parameters
*args : NavSetArg | MetadataNode | Sequence[MetadataNode] = ()
-
A collection of nav items (e.g.,
shiny.ui.nav_panel
). 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.
See Also
Examples
#| standalone: true
#| components: [editor, viewer]
#| layout: vertical
#| viewerHeight: 400
## file: app.py
from shiny import App, Inputs, Outputs, Session, reactive, ui
app_ui = ui.page_sidebar(
ui.sidebar(
ui.input_radio_buttons(
"controller", "Controller", ["1", "2", "3"], selected="1"
)
),
ui.navset_hidden(
ui.nav_panel(None, "Panel 1 content", value="panel1"),
ui.nav_panel(None, "Panel 2 content", value="panel2"),
ui.nav_panel(None, "Panel 3 content", value="panel3"),
id="hidden_tabs",
),
)
def server(input: Inputs, output: Outputs, session: Session):
@reactive.effect
@reactive.event(input.controller)
def _():
ui.update_navs("hidden_tabs", selected="panel" + str(input.controller()))
app = App(app_ui, server)