I want to display a ValueBox within Shiny using ShinyDashboards.
It does NOT render inside a tabItem, but does outside tabItem
I need to used tabItems, is there a workaround?
#---- This does NOT show anything ----#
##########################################
ui.R
dashboardPage(
dashboardHeader(title = "Dynamic boxes"),
dashboardSidebar(),
dashboardBody(
tabItems(tabItem(tabName="TotalTVs",
valueBoxOutput("vbox")
)
)
)
)
##########################################
server <- function(input, output) {
output$vbox <- renderValueBox({
valueBox(
"Title",
200,
icon = icon("credit-card")
)
})
}
#---- This does WORK ----#
##########################################
ui.R
dashboardPage(
dashboardHeader(title = "Dynamic boxes"),
dashboardSidebar(),
dashboardBody(
valueBoxOutput("vbox")
)
)
##########################################
server <- function(input, output) {
output$vbox <- renderValueBox({
valueBox(
"Title",
200,
icon = icon("credit-card")
)
})
}