aniview: Animate an element when it comes into view

Description Usage Arguments Examples

View source: R/aniview.R

Description

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

Usage

1
aniview(element, animation, ...)

Arguments

element

An shiny or rmarkdown element.

animation

An animation from animate.css

...

Additional class element

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(shiny)

ui <- function(){
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.")
 })
}

if(interactive()) shinyApp(ui, server)

aniview documentation built on April 14, 2020, 6:44 p.m.