jseval {shinyChakraUI} | R Documentation |
Evaluate JS code
Description
Evaluate JavaScript code in the application.
Usage
jseval(code)
Arguments
code |
JavaScript code given as a string |
Value
A list containing the URL-encoded JavaScript code.
Examples
library(shiny)
library(shinyChakraUI)
ui <- chakraPage(
br(),
chakraComponent(
"mycomponent",
Tag$Button(
colorScheme = "pink",
size = "lg",
onClick = jseval('() => alert("Hello Chakra")'),
"Trigger alert"
)
)
)
server <- function(input, output, session){}
if(interactive()){
shinyApp(ui, server)
}
[Package shinyChakraUI version 1.1.1 Index]