Learn R Programming


{shinyjs} lets you perform common useful JavaScript operations in Shiny apps that will greatly improve your apps without having to know any JavaScript.

Examples include: hiding an element, disabling an input, resetting an input back to its original value, delaying code execution by a few seconds, and many more useful functions for both the end user and the developer. {shinyjs} can also be used to easily call your own custom JavaScript functions from R.

Need Shiny help? I’m available for consulting. If you find {shinyjs} useful, please consider supporting my work to unlock rewards! ❤

This package is part of a larger ecosystem of packages with a shared vision: solving common Shiny issues and improving Shiny apps with minimal effort, minimal code changes, and straightforward documentation. Other packages for your Shiny apps:

Copy Link

Version

Install

install.packages('shinyjs')

Monthly Downloads

126,917

Version

2.1.0

License

MIT + file LICENSE

Maintainer

Last Published

December 23rd, 2021

Functions in shinyjs (2.1.0)

js

Call user-defined JavaScript functions from R
click

Click on a Shiny button
delay

Execute R code after a specified number of milliseconds has elapsed
inlineCSS

Add inline CSS
classFuncs

Add/remove CSS class
html

Change the HTML (or text) inside an element
disabled

Initialize a Shiny input as disabled
messageFuncs

Show a message
extendShinyjs

Extend shinyjs by calling your own JavaScript functions
hidden

Initialize a Shiny tag as hidden
runjs

Run JavaScript code
onevent

Run R code when an event is triggered on an element
reset

Reset input elements to their original values
removeEvent

Remove an event that was added to an element
visibilityFuncs

Display/hide an element
shinyjs

shinyjs
showLog

Print any JavaScript console.log messages in the R console
colourInput

Defunct functions in shinyjs
runcode

Construct to let you run arbitrary R code live in a Shiny app
runExample

Run shinyjs examples
refresh

Refresh the page
useShinyjs

Set up a Shiny app to use shinyjs
stateFuncs

Enable/disable an input element