I am using the library shinythemes https://rstudio.github.io/shinythemes/ but I would like to change the color of radiogroup buttons. How can I change the color?
radioGroupButtons(
status = "primary ",
inputId = "indicadores_radiogroup",
choices = c("Casos" = "Confirmados", "Muertes"= "Muertes"),
),
Thanks
For your own specific color, you can try the following:
ui = fluidPage(
radioGroupButtons(
#status = "primary ", ## you can change status value to change to select few colors
inputId = "indicadores_radiogroup",
checkIcon = list(yes = icon("check")),
choiceValues = c("Confirmados", "Muertes"),
choiceNames = c("Casos", "Muertes"),
justified = TRUE, width = "300px"
),
tags$script("$(\"input:radio[name='indicadores_radiogroup'][value='Confirmados']\").parent().css('background-color', '#FF4500');"),
tags$script("$(\"input:radio[name='indicadores_radiogroup'][value='Muertes']\").parent().css('background-color', '#7EF373');"),
)
server = function(...) {}
shinyApp(ui, server)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With