JohnCoene / cicerone

🏛️ Give tours of your Shiny apps
https://cicerone.john-coene.com
Other
192 stars 7 forks source link

customize dialog window? #44

Open Intangibil opened 2 years ago

Intangibil commented 2 years ago

Was wondering if there are options to customize the description dialog, visually. Initially something basic, like making the dialog window wider.

etiennebacher commented 2 years ago

Hi, this can be done with some CSS. For example, to make the popover wider and have a black background:

library(shiny)
library(cicerone)

guide <- Cicerone$
  new()$
  step("one", "Try", "Try")

ui <- fluidPage(
  use_cicerone(),
  tags$head(
    tags$style(
      HTML("
        div#driver-popover-item {
          max-width: 800px;
          width: 800px;
          background-color: black;
          color: white
        }
      ")
    )
  ),
  h1("Try", id = "one")
)

server <- function(input, output){
  guide$init()$start()
}

shinyApp(ui, server)