Server-side render function that pairs with glassTabsOutput(). The
expression should return a glassTabsUI() call. After each render the
glasstabs JavaScript engine is automatically reinitialised so animations and
event handlers are correctly attached to the new DOM nodes.
Usage
renderGlassTabs(expr, env = parent.frame(), quoted = FALSE)Arguments
- expr
An expression that returns a
glassTabsUI()tag object.- env
The environment in which to evaluate
expr.- quoted
Logical. Whether
expris already quoted.
Examples
if (interactive()) {
library(shiny)
ui <- fluidPage(
useGlassTabs(),
radioButtons("theme", "Theme", c("dark", "light"), inline = TRUE),
glassTabsOutput("tabs_out")
)
server <- function(input, output, session) {
output$tabs_out <- renderGlassTabs({
glassTabsUI(
"themed",
glassTabPanel("x", "X", selected = TRUE, p("X content")),
glassTabPanel("y", "Y", p("Y content")),
theme = input$theme
)
})
}
shinyApp(ui, server)
}