#' @title
#' Bulma Form: Checkbox
#'
#' @description
#' The 2-state checkbox in its native format.
#'
#' [Checkbox](https://bulma.io/documentation/form/checkbox/)
#'
#' @param name (str) human readable identifier for POST
#' @param ... (tag) content
#' @param outer_tag,inner_tag (fun) default html tags
#' @param disabled (flg) whether checkable or not
#'
#' @family Bulma Form Components
#' @export
bulma_form_checkbox <- function(name,
...,
disabled = FALSE,
outer_tag = tags$label,
inner_tag = tags$input) {
assert_string(name)
assert_function(outer_tag)
assert_function(inner_tag)
outer_tag(
class = "checkbox",
inner_tag(type = "checkbox", name = name) %>%
when(disabled, bulma_disabled(.)),
...
) %>%
when(disabled, bulma_disabled(.)) %>%
add_class("bulma_form_checkbox")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.