如何将 pickerinput 标签更改为精细而不是粗体

How to change the pickerinput label to fine instead of bold

我正在创建一个闪亮的应用程序。 使用 pickerinput 创建标签时,默认为粗体。 是否可以将其更改为细则?

如果你知道怎么做,或者你知道可以作为参考的网页,请告诉我。

很高兴认识你。

示例代码如下。

library(shiny)
library(leaflet)
library(leaflet.extras)

ui <- fluidPage(
  titlePanel("ShinyApp"),
  sidebarLayout(
    sidebarPanel(
        pickerInput(
        inputId = "Pick",
        label = "SampleSampleSample",
        choices = list(
          c("Sample"),
          Test_list = c("Test1", "Test2", "Test3")
        ),
        options = list(
          `actions-box` = TRUE,
          size = 7,
          `selected-text-format` = "count > 3"
        ),
        multiple = FALSE
      ),
    ),
    mainPanel(
    )
  )
)

server <- function(input, output, session) {}

shinyApp(ui, server)

试试下面的 css 代码。您可以从 css.

中删除 color: red
css <-"
#expr-container label {
  font-weight: 400;
  color: red; 
}
"

ui <- fluidPage(
  titlePanel("ShinyApp"),
  sidebarLayout(
    
    sidebarPanel(
      tags$style(css),
      tags$div(id = "expr-container", pickerInput(
        inputId = "Pick",
        label = "SampleSampleSample",
        choices = list(
          c("Sample"),
          Test_list = c("Test1", "Test2", "Test3")
        ),
        options = list(
          `actions-box` = TRUE,
          size = 7,
          `selected-text-format` = "count > 3"
        ),
        multiple = FALSE
      )),
    ),
    mainPanel(
    )
  )
)

server <- function(input, output, session) {}

shinyApp(ui, server)