css - Shiny - Changing size, colour and font of text (boxes) -
this must simple question, haven't managed find script or advice regarding changing size, font , colour of text in shinydashboard boxes. example, want make box display 14px arial grey text:
box(width = 4, title = "sample", "this test")
i imagine requires css, there way can achieve using built-in functions shiny?
many thanks.
you need change box's css work. pass css directly in ui, using tablehtml::make_css
. function box
creates html class called "box" can use change box's css:
library(shiny) library(tablehtml) ui <- fluidpage( tags$style(make_css(list('.box', c('font-size', 'font-family', 'color'), c('14px', 'arial', 'red')))), box(width = 4, title = "sample", "this test") ) server <- function(input, output) {} shinyapp(ui = ui, server = server)
output:
i made text red can tell difference black easily. can replace grey or whichever colour want.
Comments
Post a Comment