actionBttn | R Documentation |
Like shiny::actionButton()
but awesome, via https://bttn.surge.sh/
actionBttn(
inputId,
label = NULL,
icon = NULL,
style = "unite",
color = "default",
size = "md",
block = FALSE,
no_outline = TRUE,
...
)
inputId |
The |
label |
The contents of the button, usually a text label. |
icon |
An optional icon to appear on the button. |
style |
Style of the button, to choose between |
color |
Color of the button : |
size |
Size of the button : |
block |
Logical, full width button. |
no_outline |
Logical, don't show outline when navigating with keyboard/interact using mouse or touch. |
... |
Other arguments to pass to the container tag function. |
downloadBttn()
if (interactive()) {
library(shiny)
library(shinyWidgets)
ui <- fluidPage(
tags$h2("Awesome action button"),
tags$br(),
actionBttn(
inputId = "bttn1",
label = "Go!",
color = "primary",
style = "bordered"
),
tags$br(),
verbatimTextOutput(outputId = "res_bttn1"),
tags$br(),
actionBttn(
inputId = "bttn2",
label = "Go!",
color = "success",
style = "material-flat",
icon = icon("sliders"),
block = TRUE
),
tags$br(),
verbatimTextOutput(outputId = "res_bttn2")
)
server <- function(input, output, session) {
output$res_bttn1 <- renderPrint(input$bttn1)
output$res_bttn2 <- renderPrint(input$bttn2)
}
shinyApp(ui = ui, server = server)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.