I am trying to control the size and appearance of sliderInput in Shiny. In particular, I already made it bigger and wider, and also changed the background colors of the slider. I want to make the ends of the square of the slider, delete the labels that appear under the slider, and then put the values ββ(1:10) in white inside the panel body. I tried to manipulate CSS, but only had moderate success. The slider is larger and wider, but one side of the panel is square, and I cannot move the text. Obviously my CSS skills are sub-pairs. I have already consulted with various textbooks, but I canβt crack them. Any help would be greatly appreciated as I was really stuck.
Here is what I tried:
ui <- fluidPage( tags$style(HTML(".irs-bar {width: 100%; height: 25px; background: black; border-top: 1px solid black; border-bottom: 1px solid black;}")), tags$style(HTML(".irs-bar-edge {background: black; border: 1px solid black; height: 25px; border-radius: 15px 15px 15px 15px;}")), tags$style(HTML(".irs-line {border: 1px solid black; height: 25px;}")), tags$style(HTML(".irs-grid-text {font-family: 'arial'; color: black}")), tags$style(HTML(".irs-max {font-family: 'arial'; color: black;}")), tags$style(HTML(".irs-min {font-family: 'arial'; color: black;}")), tags$style(HTML(".irs-single {color:black; background:#6666ff;}")), uiOutput("testSlider") ) server <- function(input, output, session){ output$testSlider <- renderUI({ sliderInput( inputId="test", label=NULL, min=1, max=10, value=5, step = 1, width='100%' )
source share