0

I am creating an app with shiny. When creating a label with pickerinput, it is in bold by default. Is it possible to change this to fine print?

If you know how to do it, or if you know a web page that can be used as a reference, please let me know.

Nice to meet you.

The sample code is below.

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)
ken iwa
  • 171
  • 8

1 Answers1

1

Try the css code below. You can remove the color: red line from css.

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)

output

YBS
  • 19,324
  • 2
  • 9
  • 27
  • 1
    @keniwa, it appears that you have not accepted any answers for your previous queries. It is considered polite to accept an answer that has answered your OP. This helps others who are looking for a solution for the same/similar query. Furthermore, people may be willing to help you in your future queries. – YBS Jan 07 '21 at 12:32
  • I'm sorry. What does it mean to accept an answer to a previous question? Do you need any operation? I hope you can tell me. – ken iwa Jan 14 '21 at 02:13
  • At the top left of the answer, there is an option to upvote (above 0) or downvote (below 0). Then just below the down arrow for down vote, you can click on the clock to accept the answer. Once you accept, it will show green colored tick mark. – YBS Jan 14 '21 at 02:41