Search code examples
shinyflexdashboard

Flexdashboard with Shiny - Widget Font Style


Hi I am building a dashboard using Flexdashboard and including shiny features. I included a sidebar with Date Range, I am trying to change the Font_Style to show it bold. I tried the following but its not working, any ideas:

br()
tags$style("label {font-style: bold;}")
dateRangeInput("dates", label = h6("DATE RANGE"))
hr()

Widget Snapshot


Solution

  • Try tags$style(".input-group-addon {font-weight: bold;}"). Note that the class is input-group-addon and use font-weight: bold instead,..

    library(shiny)
    ui <- fluidPage(
      tags$style(".input-group-addon {font-weight: bold;}"),
      dateRangeInput(inputId = "a", label = "", start = Sys.Date(), end = Sys.Date())
    )
    
    server <- function(input, output, session) {
    
    }
    
    shinyApp(ui, server)