Learn R Programming

⚠️There's a newer version (2.1.0) of this package.Take me there.

shinyjs

Easily improve the user experience of your Shiny apps in seconds Official website · by Dean Attali


{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! ❤

Table of contents

Copy Link

Version

Install

install.packages('shinyjs')

Monthly Downloads

128,048

Version

2.0.0

License

MIT + file LICENSE

Maintainer

Last Published

December 23rd, 2021

Functions in shinyjs (2.0.0)

classFuncs

Add/remove CSS class
runcode

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

Run JavaScript code
click

Click on a Shiny button
delay

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

Change the HTML (or text) inside an element
showLog

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

Enable/disable an input element
refresh

Refresh the page
inlineCSS

Add inline CSS
onevent

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

Defunct functions in shinyjs
shinyjs

shinyjs
disabled

Initialize a Shiny input as disabled
messageFuncs

Show a message
js

Call user-defined JavaScript functions from R
hidden

Initialize a Shiny tag as hidden
extendShinyjs

Extend shinyjs by calling your own JavaScript functions
reset

Reset input elements to their original values
visibilityFuncs

Display/hide an element
runExample

Run shinyjs examples
useShinyjs

Set up a Shiny app to use shinyjs