startAnim {shinyanimate} | R Documentation |
Start an animation
Description
Start an animation of the UI element.
Usage
startAnim(session, id, type = NULL, delay = NULL)
Arguments
session |
The session object passed to function given to shinyServer. |
id |
the id of the UI element for which you want to add animation. |
type |
The type of animation to use, valid values correspond to the types in https://daneden.github.io/animate.css/ |
delay |
The time after which you want to add animationin milliseconds |
See Also
Examples
if(interactive()){
library(shiny)
library(shinyanimate)
ui <- fluidPage(
withAnim(),
tags$div(id = 'title', h1('ANIMATION')),
actionButton(inputId = "button", label = "Animate")
)
server <- function(input, output, session){
observeEvent(input$button,{
startAnim(session, 'title', 'bounce')
})
}
shinyApp(ui, server)
}
[Package shinyanimate version 0.4.0 Index]