Closed CruzJulian closed 1 year ago
Hello, If you want to customize choices item using {bslib}, you can use sass variables listed here : https://getbootstrap.com/docs/5.3/components/dropdowns/#sass-variables, for example :
bs_theme(
version = 5,
bootswatch = "united",
"dropdown-link-active-color" = "#FFF",
"dropdown-link-active-bg" = "#17a2b8"
)
Victor
I have this example. In it, the select button will be class "btn-info", but the choices will be class "btn-outline-primary". I want to have all in the same class. What can I do?¡
` library("shiny") library("shinyWidgets") library("bslib")
food_options <- list( fruits = c( "apples", "pears", "oranges", "grapefruits", "mandarins", "limes", "bananas", "mangoes", "strawberries", "raspberries", "blueberries", "watermelons", "rockmelons", "honeydew melons", "tomatoes", "avocados" ), pasta = c( "Spaghetti", "Tagliatelle", "Penne", "Ravioli", "Tortellini", "Farfalle", "Fusilli", "Shell Pasta", "Lasagna Sheets", "Gnocchi" ) )
ui <- bootstrapPage( theme = bs_theme(version = 5, bootswatch = "united"), pickerInput( inputId = 'sel_food', label = 'Chose some food.', choices = food_options, selected = food_options[1], options = list(style = "btn-info p-1", size = 10) ), lang = "en" )
server <- function(input, output, session) {
}
shinyApp(ui, server) `