I would like to write an introduction tour using the function introjs for my R shiny app where one of the elements which gets highlighted is a pickerInput. But I am having troubles with the correct highlighting.
Here's an example:
library(shiny)
library(rintrojs)
ui <- fluidPage(
introjsUI(),
pickerInput(
inputId = "color",
label = "What is your favorite color?",
choices = c("Red", "Green", "Blue")
),
br(),
actionButton(inputId = "tour", label = "Start Tour")
)
server <- function(input, output, session) {
introjs(session)
observeEvent(input$tour, {
introjs(session, options = list(
steps = list(
list(element = "#color",
intro = "Pick a color."),
list(element = "#tour",
intro = "This is a button.")
)
))
})
}
shinyApp(ui, server)
I would like to have the whole pickerInput highlighted (like it does when it highlights the button). But this is what happenes:
Something is wrong with the highlighting
If I use the introBox instead of specifiying the elements of the tour within the introjs-call the problem is solved. But since I would like to implement multiple tours, the soluiton in this post suggests to not use the introBox.
Is there a way to highlight the pickerInput correctly?