-
Notifications
You must be signed in to change notification settings - Fork 158
Open
Description
library("shiny")
library("shinyWidgets")
ui <- fluidPage(
# checkboxGroupButtons(
# inputId = "somevalue",
# choices = c("A", "B", "C"),
# label = "My label"
# ),
# Custom CSS to ensure vertical alignment of checkbox and its label
prettyCheckboxGroup("somevalue", "Variables to show:",
c("Cylinders" = "A",
"text" = "A",
"Transmission" = "B",
"Gears" = "C",
"Cylinders" = "A",
"text" = "A",
"Transmission" = "B",
"Gears" = "C",
"text" = "A",
"Transmission" = "B",
"Gears" = "C"
),
status = "primary", # "info" provides a blue color
animation = "pulse", # Optional: Adds a pulse animation
icon = icon("check"), # Specifies the Font Awesome check icon
inline = TRUE
)
,
verbatimTextOutput(outputId = "res"),
virtualSelectInput(
inputId = "updateselected",
label = "Update selected:",
choices = c("A", "B", "C"),
multiple = TRUE,
),
actionButton(inputId = "clear", label = "Clear selected")
)
server <- function(input, output, session) {
output$res <- renderPrint({
input$somevalue
})
observe({
x <- input$updateselected
# Can use character(0) to remove all choices
if (is.null(x))
x <- character(0)
updatePrettyCheckboxGroup(
session = session,
inputId = "somevalue",
selected = x
)
})
}
if (interactive())
shinyApp(ui = ui, server = server)
I am wondering if i could have 5 columns alignment not missy like below

Metadata
Metadata
Assignees
Labels
No labels