Max M Max M - 3 months ago 53
R Question

bullet point size shiny R list tag

I have a very simple problem, but due to my lack of HTML skills and applying HTML attributes in shiny R, I cannot figure it out, so here it goes:

How do I increase the size of the bullet points of the list tag?

Is there a more detailed tutorial that explains the logic of using HTML code and attributes within the shiny R environment?

MEW:

rm(list=ls())
library(shiny)
server<-shinyServer(function(input, output) {})

ui<-shinyUI(fluidPage(
tags$div(tags$ul(
tags$li("test1"),
tags$li("test2"),
tags$li("test3")), style = "font-size: 15px")
)
)

runApp(list(ui=ui,server=server))

Answer

Like a typical html page, you can have customized css in your header. Refer this link: http://shiny.rstudio.com/articles/css.html

library(shiny)
server<-shinyServer(function(input, output) {}) 

ui<-shinyUI(fluidPage(

  tags$head(
    tags$style(HTML("
                    li {
                    font-size: 36px;

                    }
                    li span {
                    font-size: 18px;
                    }
                    ul {
                    list-style-type: square;
                    }

                    "))
    ),

  tags$div(tags$ul(
    tags$li(tags$span("test1")),
    tags$li(tags$span("test2")),
    tags$li(tags$span("test3"))))
)
)

runApp(list(ui=ui,server=server))

Output:

enter image description here