Add an animated glow to an element
js_glow.Rd
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 withns
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.
See also
Other JS:
js_after()
,
js_callback()
,
js_callout()
,
js_mouseover_once()
,
js_set_input_val()
,
use_driver.js()
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