| renderGlassTabs | R Documentation |
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.
renderGlassTabs(expr, env = parent.frame(), quoted = FALSE)
expr |
An expression that returns a |
env |
The environment in which to evaluate |
quoted |
Logical. Whether |
A render function suitable for assigning to an output slot.
Other glass tabs:
appendGlassTab(),
disableGlassTab(),
glassTabCondition(),
glassTabPanel(),
glassTabsOutput(),
glassTabsServer(),
glassTabsUI(),
showGlassTab(),
updateGlassTabBadge(),
updateGlassTabsUI()
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.