topTabs: Top-level tabs

topTabsR Documentation

Top-level tabs

Description

Tabs that go directly inside UINav(). Pick one by how much the tab holds:

Usage

triLevelTab(title, ..., icon = NULL)

biLevelTab(title, ..., icon = NULL, id = title, height = cardHeight())

sidebarLevelTab(
  title,
  sidebarElements = NULL,
  ...,
  icon = NULL,
  height = cardHeight()
)

singleTab(title, ..., icon = NULL, height = cardHeight())

Arguments

title

Tab name shown in the navigation bar.

...

Contents. See the table above.

icon

Optional icon shown before the title, for example bsicons::bs_icon("table").

id

ID of the row of sub tabs, used with showNavTabs() and hideNavTabs(). Defaults to the title with spaces removed.

height

Height of the card holding the tab's contents. Change the default for every tab with options(EZRShiny.cardHeight = "70vh").

sidebarElements

A list() of inputs for the sidebar.

Details

Function Holds Put inside it
singleTab() one page inputs and outputs
sidebarLevelTab() one page with a sidebar inputs and outputs
biLevelTab() a row of sub tabs subTab(), subSidebarTab()
triLevelTab() a drop-down menu of tabs with sub tabs triSubTab(), triSubSidebarTab()

Value

A 'bslib' navigation panel or menu.

Examples

singleTab("About", shiny::p("This app explores the Titanic data."))

sidebarLevelTab("Plot",
  sidebarElements = list(navButton("makePlot", "Make plot")),
  navOutputPlot("thePlot")
)

biLevelTab("Explore",
  subTab("Summary", navOutputTable("summaryTable")),
  subTab("Plots", navOutputPlot("summaryPlot"))
)

triLevelTab("Analyses",
  triSubTab("Group A",
    subTab("Table", navOutputTable("tableA"))
  ),
  triSubTab("Group B",
    subTab("Table", navOutputTable("tableB"))
  )
)

EZRShiny documentation built on Oct. 10, 2026, 5:08 p.m.