Skip to contents

Add an animated glow to an element

Usage

js_glow(id, color = "deepskyblue", asis = FALSE, delay = NULL, .ns = ns_find())

Arguments

id

(chr) Automatically namespaced with ns if inside a module

color

chr A hexadecimal color to animate with

asis

If TRUE, use the ID as-is even when inside a module (instead of adding the namespace prefix to the ID).

delay

dbl duration in ms before removing the content from the element. Set to 0 to allow the element to persist.

.ns

fun ns function. Typically found automatically.

Examples

if (FALSE) {
library(shiny)
devtools::load_all(pkgload::pkg_path())
# Define UI for application that draws a histogram
ui <- fluidPage(
  shinyjs::useShinyjs(),
  div(id = "test", "blah", style = "width:50px"),
)


# Define server logic required to draw a histogram
server <- function(input, output) {

  shinyVirga::js_glow(
    id = "test"
  )

}
}

shinyApp(ui = ui, server = server)
#> Error in shinyApp(ui = ui, server = server): object 'server' not found