glassTabPanel: Define a single glass tab panel

View source: R/glass_tabs.R

glassTabPanelR Documentation

Define a single glass tab panel

Description

Used as child arguments inside glassTabsUI(). Each call defines one tab button and its associated content pane.

Usage

glassTabPanel(value, label, ..., icon = NULL, selected = FALSE)

Arguments

value

A unique string identifier for this tab (e.g. "A").

label

The text shown on the tab button.

...

UI elements for the pane content.

icon

Optional icon shown to the left of the tab label. Accepts any htmltools-compatible tag, e.g. shiny::icon("table") or fontawesome::fa("house"). Pass NULL (default) for no icon.

selected

Logical. Whether this tab starts selected. Only the first selected = TRUE tab takes effect; defaults to FALSE.

Value

A list of class "glassTabPanel" consumed by glassTabsUI().

See Also

Other glass tabs: appendGlassTab(), disableGlassTab(), glassTabCondition(), glassTabsOutput(), glassTabsServer(), glassTabsUI(), renderGlassTabs(), showGlassTab(), updateGlassTabBadge(), updateGlassTabsUI()

Examples

# Plain text label
overview_tab <- glassTabPanel("overview", "Overview",
  shiny::h3("Welcome"),
  shiny::p("This is the overview tab.")
)

# With a Shiny icon
data_tab <- glassTabPanel("data", "Data",
  icon = shiny::icon("table"),
  shiny::p("Data content here.")
)


glasstabs documentation built on Sept. 11, 2026, 5:08 p.m.