shiny::checkboxGroupInput("id", "label", choices = c("A", "B"))
twCheckboxGroupInput("id", "label",
choices = c("A", "B"),
width = "200px", disabled = c(TRUE, FALSE),
container_class = "OUTER.CONTAINER",
inner_container_class = c("INNER CONTAINER 1", "INNER CONTAINER 2"),
label_class = c("LABEL 1", "LABEL 2"),
input_class = "INPUT-ALL"
)
# basic full shiny example
library(shiny)
ui <- fluidPage(
use_tailwind(),
twCheckboxGroupInput(
"chks", "Check all that apply:",
choices = c("This" = "a", "That" = "b", "None (disabled)" = "c"),
disabled = c(FALSE, FALSE, TRUE),
container_class = "w-48 m-4 p-2 border border-gray-200 rounded-md drop-shadow-md",
label_class = "font-serif text-gray-600",
input_class = "rounded rounded-full text-pink-500 border-pink-200 focus:ring-pink-500",
),
verbatimTextOutput("out")
)
server <- function(input, output) {
output$out <- renderText({
input$chks
})
}
if (interactive()) shiny::shinyApp(ui, server)
Run the code above in your browser using DataLab