appButton | R Documentation |
Create a large button ideal for web applications but identical to the classic Shiny action button.
appButton(..., inputId, label, icon = NULL, width = NULL, color = NULL)
... |
Named attributes to be applied to the button or link. |
inputId |
The |
label |
The contents of the button or linkâusually a text label, but you could also use any other HTML, like an image. |
icon |
An optional |
width |
The width of the input, e.g. |
color |
Button backgroun color. Valid statuses are defined as follows:
|
David Granjon, dgranjon@ymail.com
if (interactive()) { library(shiny) library(bs4Dash) shinyApp( ui = dashboardPage( dashboardHeader(), dashboardSidebar(), dashboardBody( box( title = "App Buttons", status = NULL, appButton( inputId = "myAppButton", label = "Users", icon = icon("users"), color = "orange", dashboardBadge(textOutput("btnVal"), color = "primary") ) ) ), title = "App buttons" ), server = function(input, output) { output$btnVal <- renderText(input$myAppButton) } ) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.