The ‘shinyLottie’ package allows users to easily integrate and control ‘Lottie’ animations within ‘shiny’ applications, without the need for idiosyncratic expression or use of ‘JavaScript’. This includes utilities for generating animation instances, controlling playback, manipulating animation properties, and more.
You can install the development version of ‘shinyLottie’ from GitHub with:
# install.packages("devtools")
devtools::install_github("CamHowitt/shinyLottie")
Introducing ‘Lottie’ animations to a ‘shiny’ app can be accomplished using just two ‘shinyLottie’ functions:
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)
For more advanced implementations, please refer to the following articles:
vignette("shinyLottie")
vignette("Controlling-Animations")
vignette("Event-Listeners")
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.