inst/doc/shinyLottie.R

## ----include = FALSE----------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

## ----eval = FALSE-------------------------------------------------------------
#  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)

## ----eval = FALSE-------------------------------------------------------------
#  library(shiny)
#  library(shinyLottie)
#  
#  ui <- fluidPage(
#    include_lottie(),
#    lottie_animation(
#      path = "shinyLottie/example.json",
#      name = "my_animation",
#      height = "100px",
#      width = "100px"
#    ) |> lottie_button(inputId = "my_button")
#  )
#  
#  server <- function(input, output, session) {
#    observeEvent(input$my_button, {
#      print("Button pressed")
#    })
#  }
#  
#  shinyApp(ui, server)

Try the shinyLottie package in your browser

Any scripts or data that you put into this service are public.

shinyLottie documentation built on June 22, 2024, 9:30 a.m.