Description Usage Arguments Examples
Use AniView
1 | use_aniview(animateThreshold = 0, scrollPollInterval = 20)
|
animateThreshold |
integrer. +ve numbers delay the animation sequence until the specified number of pixels have come into view. -ve numbers will trigger the animation sequence prior to the element coming into view. |
scrollPollInterval |
integrer. frequency at which user scrolling is 'polled' i.e. tested. This is in milliseconds and is an extension to jQuery's in-built 'scroll' event/handler. |
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.