Shiny R: Conditional style for textInput

Viewed 1407

I want to change the colour of some textInput labels, based on a selection from a selectInput output.

The idea is to show, what data in new based on another selection for interactive text. The text itself, I have managed (updateTextInput). I would like to do something similar for their label as not all textInput change.

So, how do I change the colour of the Pop textInput based on the colour indicated from the TagColor input, and then again, how do I reset the color to its default style?

library(shiny)

ui<-shinyUI(
  fluidPage(
    selectInput("TagColor", "Color of my Tag",choices=c("Red","Blue",
    "Yellow","Black", "Initial"), 
    selected = "Red", multiple = FALSE),
    textInput("Pop", "Var1", "Test")
  )
)

server<-shinyServer(function(input, output) {


})


shinyApp(ui,server)
1 Answers
Related