# NOT RUN {
if (interactive()) {
library(shiny)
library(shiny.semantic)
ui <- navbar_page(
title = "App Title",
id = "navbar",
tab_panel(
"Plot",
action_button("hide", "Hide Table"),
action_button("show", "Show Table"),
value = "plot"
),
tab_panel("Summary", value = "summary"),
tab_panel("Table", value = "table")
)
server <- function(input, output, session) {
observeEvent(input$hide, hide_tab(session, "navbar", "table"))
observeEvent(input$show, show_tab(session, "navbar", "table"))
}
shinyApp(ui, server)
}
# }
Run the code above in your browser using DataLab