I want my app to load 3 tabs: Trend, Top 10, and TBD, each having their own sidebar & inputs. I can't figure out what to nest inside of what to make that happen, and the limited examples I've found aren't helping.
I think there's a way to connect an ID to each tab and have various inputs display based on which tab (& therefore ID) is selected... but i can't figure out how to do that. See my UI code below.
library(shiny)
library(shinythemes)
# Define UI for dataset viewer application
fluidPage(theme = shinytheme("simplex"),
# Application title
titlePanel("Baby Names Throughout Modern U.S. History, 1880 - 2016"),
sidebarLayout(
sidebarPanel(
conditionalPanel(
condition = "input$id == 'tab1'",
textInput(inputId = "list", label = "Enter a name:", value = "Jessie"),
sliderInput(inputId = "year", label = "Select a year:", value = 2016, min = 1880, max = 2016, step = 1, sep = ""),
submitButton("Refresh View")
)),
mainPanel(
tabsetPanel(
tabPanel("Trend", plotOutput("view"), id = "tab1"),
tabPanel("Top 10 Table", plotOutput("TenTable")),
tabPanel("TBD Tab", plotOutput("Test2"))
)
)
),
tags$footer("Footer here.")
)