I'm trying to do a presentation of my shiny app with the package rintrojs. This works well when I use it on actionButton or things like that but I would like to use it on the names of tabPanels.
I don't want to present something display in the panels, I want to have an intro box on the name of the panels. However, when doing this, the tabPanels do not display anymore. How should I do it?
Here's a reproducible example:
library(shiny)
library(rintrojs)
ui <- navbarPage(
title = "foo",
introjsUI(),
tabPanel(
introBox(title = "Panel 1",
data.step = 1,
data.intro = "This is Panel 1"),
fluidRow(actionButton("button1", "Button 1"))
),
tabPanel(
introBox(title = "Panel 2",
data.step = 2,
data.intro = "This is Panel 2"),
fluidRow(actionButton("button2", "Button 2"))
)
# If you want to see a "normal" app, comment from "introjsUI()" to here, and uncomment the chunk below
# tabPanel(title = "Panel 1",
# fluidRow(actionButton("button1", "Button 1"))
# ),
# tabPanel(title = "Panel 2",
# fluidRow(actionButton("button2", "Button 2"))
# )
)
server <- shinyServer(function(input, output, session) {
introjs(session)
})
shinyApp(ui, server)
Also asked on StackOverflow