#' @title
#' Bulma Form: Button
#'
#' @description
#' A button for the form. This has the same characteristics as
#' [`bulma_button()`] but specific to forms (tag of `<button>`).
#'
#' @param name (str) identifier for submissions; defaults to submit
#' @param type (str) what type of input; defaults to submit
#' @param value (str) the label for the button
#' @inheritParams bulma_button
#'
#' @family Bulma Form Components
#' @seealso bulma_button
#' @export
bulma_form_button <- function(name = "submit",
value = name,
...,
type = c("button", "submit", "reset"),
color = c("primary", "link", "info",
"success", "warning", "danger",
"white", "black", "light", "dark",
"ghost", "text"),
shade = c("light", "dark"),
size = c("small", "medium", "large", "normal"),
state = c("hovered", "focused", "active",
"loading", "static"),
full_width = FALSE,
outlined = FALSE,
inverted = FALSE,
rounded = FALSE,
disabled = FALSE,
tag = tags$input) {
assert_string(name)
type <- match_arg(type) %||% "button"
assert_string(type)
bulma_button(
...,
value = value,
type = type, name = name,
color = color, shade = shade, size = size, state = state,
full_width = full_width, outlined = outlined, inverted = inverted,
rounded = rounded, disabled = disabled,
tag = tag
) %>%
add_class("bulma_form_button")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.