Learn R Programming

shinyLottie (version 1.0.0)

include_lottie: Include 'Lottie' Functionality within 'shiny'

Description

Responsible for retrieving the 'Lottie' library and initialising the necessary 'JavaScript' library. As such, this function must be included within the UI object of a shinyApp in order to enable 'shinyLottie' functionality.

Usage

include_lottie(version = "5.12.2")

Value

A list of HTML tags to be included within the head element of a 'shiny' application.

Arguments

version

A character string specifying the version of the 'Lottie' library to source via CDN.

Examples

Run this code
if (FALSE) { # interactive()
library(shiny)
library(shinyLottie)

ui <- fluidPage(
  include_lottie(),
  lottie_animation(
    path = "shinyLottie/example.json",
    name = "my_animation"
  )
)

server <- function(input, output, session) {}

shinyApp(ui, server)
}

Run the code above in your browser using DataLab