与问题here和here相关,我想从ShinyWidgets更改pickerInput菜单的CSS。我正在使用flexdashboard,我希望样式与selectInput菜单中的样式完全匹配。我意识到我可以通过将YAML中的整体主题设置为bootstrap来做到这一点,但我不喜欢使用全局解决方案。
---
title: "Testing picker styles"
output:
flexdashboard::flex_dashboard
runtime: shiny
---
```{r setup, include=F}库(闪亮)
库(Flexdashboard)
库(ShinyWidgets)
Column
-----------------------------------------------------------------------
```{r}selectInput(inputId = "id1",label =“选择输入”,choices = attr(UScitiesD,“label”))
pickerInput(inputId = "id2",label =“选取器输入”,choices = attr(UScitiesD,“label”))

发布于 2020-06-24 23:37:51
pickerInput的样式类似于启动按钮,{flexdashboard}使用启动手表的Cosmo主题(https://bootswatch.com/3/cosmo/),这就是它显示为黑色的原因。
您可以使用以下命令更改按钮的类:
options = pickerOptions(style = "btn-link")(在pickerInput参数中)

或者,您可以像这样覆盖基本样式:
options = list("style-base" = "form-control", style = "")

https://stackoverflow.com/questions/62557989
复制相似问题