Learn R Programming

rintrojs (version 0.3.4)

introjsUI: Set up Shiny app to use intro.js

Description

This function must be called from a Shiny app's UI in order to use the package.

Usage

introjsUI(includeOnly = FALSE, cdn = FALSE, version = "3.2.1")

Arguments

includeOnly

Only include intro.js files. For users who will write their own javascript

cdn

Indicate whether to include intro.js files from CDN

version

Specify intro.js version to use from cdn

Examples

Run this code
if (FALSE) {
library(rintrojs)
library(shiny)

shinyApp(
ui = fluidPage(
  introjsUI(), # must include in UI
  actionButton("btn", "Click me")
),
server = function(input, output, session) {
  observeEvent(input$btn, {
    intro <- data.frame(element="#btn",
                        intro="In Codd we trust")
    introjs(session, options = list(steps= intro))
  })
}
)
}

Run the code above in your browser using DataLab