Description Usage Arguments Examples
Create a customizable checkbox with support for highly used options
1 2 3 4 5 6 7 8 | metroCheck(
inputId,
label,
value = FALSE,
disabled = FALSE,
style = c("1", "2"),
labelSide = c("left", "right")
)
|
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". |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 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) {}
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.