#' Launch Shiny demo
#'
#' @param mode Example with \code{"fullpage"} particles and another one with particles inside a \code{"container"}.
#'
#' @export
#' @importFrom shiny runApp
#'
#' @examples
#' if (interactive()) {
#'
#' shinydemo("container")
#'
#' shinydemo("fullpage")
#'
#' }
shinydemo <- function(mode = c("container", "fullpage")) {
mode <- match.arg(mode)
shiny::runApp(
appDir = system.file("shinydemo", mode, package = "particlesjs"),
display.mode = "showcase"
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.