The shinyjs package can do much more than just give you access to canned JavaScript, useful though that is. Using the extendShinyjs() function, you can very easily read R input and send it to JavaScript. It is simpler to use if the V8 package is installed. If you cannot install this package, there is a workaround; consult the documentation.
We're going to improve the application that we just produced (it will still be just as useless, of course!) by allowing the user to change the size and the color of the text. The finished application looks as follows:
Finished application