## Only run examples in interactive R sessions
if (interactive()){
library(shiny)
library(shiny.semantic)
ui <- semanticPage(
tabset(tabs =
list(
list(menu = "First Tab", content = "Tab 1"),
list(menu = "Second Tab", content = "Tab 2", id = "second_tab")
),
active = "second_tab",
id = "exampletabset"
),
h2("Active Tab:"),
textOutput("activetab")
)
server <- function(input, output) {
output$activetab <- renderText(input$exampletabset)
}
shinyApp(ui, server)
}
Run the code above in your browser using DataLab