A master button creator

masterButton(
  text = "Text",
  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,
  extraClass = NULL,
  ...
)

Arguments

text

Button text

icon

Choice of button icon

width

Width of the bottom

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

extraClass

other class names to add to the button attribute

...

Other elements to add to the button

Value

HTML of the buttons to insert into a page

Examples

card( shiny::h2("Master buttons with various styles"), header = FALSE, shiny::div(masterButton("Submit button with primary color", icon = shiny::icon("file"), size = "s", bg.type = "primary" )) )
#> <div class="col-12 p-0 sortable-grid ui-sortable"> #> <div id="box1658385804" class="panel panel-sortable" role="widget"> #> <div class="panel-container collapse show" role="content"> #> <div class="loader"> #> <i class="fa fa-spinner-third fa-spin-4x fs-xxl"></i> #> </div> #> <div class="panel-content"> #> <h2>Master buttons with various styles</h2> #> <div> #> <div> #> <button class="btn border-0 btn-primary rounded-0 btn-sm" style="width:" type="submit"> #> <i class="fa fa-file"></i> #> Submit button with primary color #> </button> #> </div> #> </div> #> </div> #> </div> #> </div> #> </div>