Customize `sliderInput()` appearance

r, shiny

Solution

do you want something like this? Make sure to adjust your `width` accordingly

library(shiny)
ui <- fluidPage(
  sliderInput('slider', 
              label = div(style='width:500px;', 
                          div(style='float:left;', 'I totally disagree'), 
                          div(style='float:right;', 'I totaly aggree')), min = 0, max = 10, value = 7, width = '500px')

)

server <- function(input, output) {}
shinyApp(ui, server)

Problem

I want to use sliders as "likert-type questions" when using shiny as a survey tool. Therefore I want to customize the caption of the ends of the slider to somewhat like "I totaly aggree" and "I totally disagree". Is there a smooth way for doing that?

Original source