Create a large button ideal for web applications but identical to the classic Shiny action button.
appButton(..., inputId, label, icon = NULL, width = NULL)
Named attributes to be applied to the button or link.
The input
slot that will be used to access the value.
The contents of the button or link--usually a text label, but you could also use any other HTML, like an image.
An optional icon()
to appear on the button.
The width of the input, e.g. '400px'
, or '100%'
;
see validateCssUnit()
.
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)
}
)
}