Upgrade to the submitButton in 'Shiny' package
submitButton( text = "Apply Changes", 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 )
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 |
HTML of the submit buttons to insert into a page
card( shiny::h2("Submit buttons with various styles"), header = FALSE, shiny::div(submitButton("Submit button with primary color", icon = shiny::icon("file"), size = "s", bg.type = "primary" )), shiny::div(submitButton("Secondary color", icon = shiny::icon("folder"), bg.type = "secondary" )), shiny::div(submitButton("Success color", icon = shiny::icon("filter"), bg.type = "success" )), shiny::div(submitButton("Warning color", icon = shiny::icon("grid"), bg.type = "warning" )), shiny::div(submitButton("Danger color", icon = shiny::icon("check"), bg.type = "danger" )), shiny::div(submitButton("Info color", icon = shiny::icon("trash"), bg.type = "info" )) )#> <div class="col-12 p-0 sortable-grid ui-sortable"> #> <div id="box1658386583" 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>Submit 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> #> <button class="btn border-0 btn-secondary rounded-0 btn-md" style="width:" type="submit"> #> <i class="fa fa-folder"></i> #> Secondary color #> </button> #> </div> #> </div> #> <div> #> <div> #> <button class="btn border-0 btn-success rounded-0 btn-md" style="width:" type="submit"> #> <i class="fa fa-filter"></i> #> Success color #> </button> #> </div> #> </div> #> <div> #> <div> #> <button class="btn border-0 btn-warning rounded-0 btn-md" style="width:" type="submit"> #> <i class="fa fa-grid"></i> #> Warning color #> </button> #> </div> #> </div> #> <div> #> <div> #> <button class="btn border-0 btn-danger rounded-0 btn-md" style="width:" type="submit"> #> <i class="fa fa-check"></i> #> Danger color #> </button> #> </div> #> </div> #> <div> #> <div> #> <button class="btn border-0 btn-info rounded-0 btn-md" style="width:" type="submit"> #> <i class="fa fa-trash"></i> #> Info color #> </button> #> </div> #> </div> #> </div> #> </div> #> </div> #> </div>