Upgrade to the actionButton in 'Shiny' package

actionButton(
  inputId,
  label,
  icon = NULL,
  width = NULL,
  ...,
  size = c("m", "xs", "s", "l", "xl"),
  style = c("default", "pill", "round", "clean"),
  bg.type = c("default", "primary", "secondary", "info", "success", "danger",
    "warning"),
  outline = FALSE
)

Arguments

inputId

Input identification

label

Input label

icon

Choice of button icon

width

Width of the bottom

...

other elements or attributes for the button

size

Size of the button, choices include "m","xs", "s", "l", "xl"

style

Style of the button, choices include "default", "pill", "round", "clean"

bg.type

Color of the button, choices include "default", "primary", "secondary", "info", "success", "danger", "warning"

outline

Use an outline styling, TRUE or FALSE

Value

HTML of the buttons to insert into a page

Examples

shiny::div(actionButton("button", "Action button with primary color", icon = shiny::icon("folder"), bg.type = "primary" ))
#> <div> #> <button class="btn action-button border-0 btn-primary rounded-0 btn-md" id="button" style="width:" type="button"> #> <i class="fa fa-folder"></i> #> Action button with primary color #> </button> #> </div>
shiny::div(actionButton("button", "Action button with primary color", icon = shiny::icon("file"), bg.type = "danger", outline = TRUE ))
#> <div> #> <button class="btn action-button btn-outline-danger rounded-0 btn-md" id="button" style="width:" type="button"> #> <i class="fa fa-file"></i> #> Action button with primary color #> </button> #> </div>