Create Semantic UI multiple checkbox
This creates a multiple checkbox using Semantic UI styles.
multiple_checkbox( input_id, label, choices, choices_value = choices, selected = NULL, position = "grouped", type = NULL, ... ) multiple_radio( input_id, label, choices, choices_value = choices, selected = choices_value[1], position = "grouped", type = "radio", ... )
input_id |
Input name. Reactive value is available under |
label |
Text to be displayed with checkbox. |
choices |
Vector of labels to show checkboxes for. |
choices_value |
Vector of values that should be used for corresponding choice.
If not specified, |
selected |
The value(s) that should be chosen initially.
If |
position |
Specified checkmarks setup. Can be |
type |
Type of checkbox or radio. |
... |
Other arguments to be added as attributes of the tag (e.g. style, childrens etc.) |
The following type
s are allowed:
NULLThe standard checkbox (default)
toggleEach checkbox has a toggle form
sliderEach checkbox has a simple slider form
## Only run examples in interactive R sessions if (interactive()) { # Checkbox library(shiny) library(shiny.semantic) ui <- function() { shinyUI( semanticPage( title = "Checkbox example", h1("Checkboxes"), multiple_checkbox("checkboxes", "Select Letters", LETTERS[1:6], value = "A"), p("Selected letters:"), textOutput("selected_letters"), tags$br(), h1("Radioboxes"), multiple_radio("radioboxes", "Select Letter", LETTERS[1:6], value = "A"), p("Selected letter:"), textOutput("selected_letter") ) ) } server <- shinyServer(function(input, output) { output$selected_letters <- renderText(paste(input$checkboxes, collapse = ", ")) output$selected_letter <- renderText(input$radioboxes) }) shinyApp(ui = ui(), server = server) }
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.