
Create a button with optional loading state and loading label
Source:R/utils.shiny.R
buttonLoading.RdCreate a button with optional loading state and loading label
Usage
buttonLoading(
...,
margin = 2L,
semantic = "default",
size = NULL,
hide = FALSE,
outline = FALSE
)Arguments
- ...
Arguments passed on to
shinyFeedback::loadingButtoninputIdthe input id
labelthe button text (label)
classthe class(es) to apply to the button
stylestyle for button (pre-loading); character string w/ CSS styling format: "color: black; background-color: red;"
loadingLabeltext to show after button is clicked (e.g. during loading)
loadingSpinnerthe loading spinner icon. Valid values are NULL, "spinner", "circle-notch", "sync", and "cog"
loadingClassthe loading button css class(es).
loadingStylestyle for button (while loading); character string w/ CSS styling format: "color: black; background-color: red;"
Examples
ui <- tagList(
buttonLoading('act_submit', label = 'Submit'),
buttonLoading('act_submit', label = 'Submit', semantic = 'danger')
)
#> Error in tagList(buttonLoading("act_submit", label = "Submit"), buttonLoading("act_submit", label = "Submit", semantic = "danger")): could not find function "tagList"
shinyAppMinimal(ui = ui)
#> Error in shinyAppMinimal(ui = ui): could not find function "shinyAppMinimal"