if (interactive()) {
library(shiny)
library(shinydashboard)
library(shinydashboardPlus)
shinyApp(
ui = dashboardPage(
dashboardHeader(),
dashboardSidebar(),
dashboardBody(
box(
title = "App Buttons",
status = NULL,
appButton(
inputId = "myAppButton",
label = "Users",
icon = icon("users"),
dashboardBadge(textOutput("btnVal"), color = "blue")
)
)
),
title = "App buttons"
),
server = function(input, output) {
output$btnVal <- renderText(input$myAppButton)
}
)
}
Run the code above in your browser using DataLab