| updateGlassTabsUI | R Documentation |
Server-side equivalent of Shiny's updateTabsetPanel(). Sends a
message to the browser to animate the tab switch just as if the user had
clicked the tab button.
updateGlassTabsUI(session, id, selected)
session |
Shiny session object. |
id |
Module id matching the |
selected |
Value of the tab to activate. |
Called for its side effect; returns NULL invisibly.
Other glass tabs:
appendGlassTab(),
disableGlassTab(),
glassTabCondition(),
glassTabPanel(),
glassTabsOutput(),
glassTabsServer(),
glassTabsUI(),
renderGlassTabs(),
showGlassTab(),
updateGlassTabBadge()
if (interactive()) {
library(shiny)
ui <- fluidPage(
useGlassTabs(),
glassTabsUI(
"tabs",
glassTabPanel("a", "A", p("Tab A"), selected = TRUE),
glassTabPanel("b", "B", p("Tab B"))
),
actionButton("go", "Go to B")
)
server <- function(input, output, session) {
observeEvent(input$go, {
updateGlassTabsUI(session, "tabs", selected = "b")
})
}
shinyApp(ui, server)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.