custom-callbacks {shinyGizmo}R Documentation

Helpful methods for custom callback setup

Description

Can be used as a 'true' or 'false' argument for custom method of js_calls.

Usage

runAnimation(..., ignoreInit = TRUE)

Arguments

...

Animation object(s) created with animation; if multiple animation objects are given then the animations will be chained.

ignoreInit

Should the animation be skipped when application is in initial state?

Examples

library(shiny)
library(shinyGizmo)
ui <- fluidPage(
    actionButton("value", "Click me", class = "btn-primary"),
    br(), br(),
    conditionalJS(
        tags$h1("Hello", style = "display: none;"),
        "input.value % 2 === 1",
        jsCalls$custom(
            true = runAnimation(animation("jello"), animation("swing")),
            false = runAnimation(animation("slideOutRight"))
        )
    )
)
server <- function(input, output, session) {}
if(interactive()) {
  shinyApp(ui, server)
}


[Package shinyGizmo version 0.4.2 Index]