I have a Shiny app that uses a couple icons from the Font Awesome library (built-in) in the UI:
icon("bolt")
icon("compass")
How do I change the color of each icon?
You can just use HTML tags instead of using icon()
tags$i(
class = "fa fa-check-square",
style = "color: rgb(0,166,90)"
)
e.g.
library(shiny)
ui <- fluidPage(
tags$p("icon:"),
tags$hr(),
tags$i(
class = "fa fa-check-square",
style = "color: rgb(0,166,90)"
),
icon("check-square")
)
server <- function(input, output, session) {
}
shinyApp(ui, server)