submitButton | R Documentation |
Upgrade to the submitButton in 'Shiny' package
submitButton(
inputId,
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
)
inputId |
input id |
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
if (interactive()) {
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"
))
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.