addHoverAnim | R Documentation |
Add animation on mouse hover for UI element.
addHoverAnim(session, id, type = NULL)
session |
The session object passed to function given to shinyServer. |
id |
the id of the UI element for which you want animation on mouse hover. |
type |
The type of animation to use, valid values correspond to the types in https://daneden.github.io/animate.css/ |
withAnim
if(interactive()){
library(shiny)
library(shinyanimate)
ui <- fluidPage(
withAnim(),
tags$div(id = 'title', h1('HOVER ON ME'))
)
server <- function(input, output, session){
observe(addHoverAnim(session, 'title', 'bounce'))
}
shinyApp(ui, server)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.