addHoverAnim: Add animation on mouse hover for UI element.

View source: R/anim.R

addHoverAnimR Documentation

Add animation on mouse hover for UI element.

Description

Add animation on mouse hover for UI element.

Usage

addHoverAnim(session, id, type = NULL)

Arguments

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/

See Also

withAnim

Examples

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)
}

Swechhya/shinyanimate documentation built on Feb. 17, 2024, 1:50 p.m.