Skip to contents

Programmatically animate Shiny and R Markdown content when it comes into view.

Usage

aniview(element, animation, ...)

Arguments

element

An shiny or rmarkdown element.

animation

An animation from animate.css

...

Additional class element

Examples

if (interactive()) {
 library(shiny)
  shinyApp(
   ui = fluidPage(
     use_aniview(), # add use_aniview() in the UI
     aniview(h1("Shiny with AniView"), animation = "fadeInUp"),
     aniview(textOutput("text"), animation = "zoomIn")
   ),
  server <- function(input, output, session){
    output$text <- renderText({ print("An animated text.") })
  }
 )
}
#> 
#> Listening on http://127.0.0.1:7558
#> [1] "An animated text."