Changing the title while using modular function

Hi all,

With the below module function is there a way to change the title of the each slider. Right now for both the sliders, the title is "Slide me"

source("inputs.R")
library(shiny)



ui <- fluidPage(slider("slider1"),
                textOutput("num1"),
                slider("slider2"),
                textOutput("num2"),
)

server <- function(input, output, session) {
    output$num1 <- renderText({
        input$slider1
    })
    
    output$num2 <- renderText({
        input$slider2
    })
    
    
}

shinyApp(ui, server)

input.R

slider <- function(id){
  sliderInput(id,"Slide Me",0,100,1)
}


sliderTextUI <- function(id){
  ns <- NS(id)
  tagList(
    sliderInput(ns("slider"), "Slide me", 0, 100, 1),
    textOutput(ns("number"))
  )
}

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.