Create a customizable checkbox with support for highly used options

metroCheck(
  inputId,
  label,
  value = FALSE,
  disabled = FALSE,
  style = c("1", "2"),
  labelSide = c("left", "right")
)

Arguments

inputId

Unique input id.

label

Checkbox label.

value

Whether the checkbox is checked at start. Default to FALSE.

disabled

Whether the checkbox is disabled at start. Default to FALSE.

style

Checkbox style: either "1" (fill) or "3" (outline).

labelSide

Label side: "left" or "right".

Examples

if (interactive()) { library(shiny) library(shinyMetroUi) shiny::shinyApp( ui = metroPage( metroCheck( inputId = "checkbox1", label = "Checkbox", labelSide = "right" ), metroCheck( inputId = "checkbox2", label = "Checkbox checked", value = TRUE, labelSide = "right" ), metroCheck( inputId = "checkbox3", label = "Checkbox disabled", disabled = TRUE, labelSide = "right" ), metroCheck( inputId = "checkbox4", label = "Checkbox style 2", style = "2", labelSide = "left" ), ), server = function(input, output) {} ) }