Description Super classes Methods See Also
Hotwire is an alternative approach to building modern web applications without using much JavaScript by sending HTML instead of JSON over the wire.
webtools::Configurable -> webtools::Plugin -> Hotwire
new()Create a new Hotwire Plugin
Hotwire$new()
router()Create a Hotwire enabled page
Hotwire$router( path, handler, ..., turbo = TRUE, stimulus = TRUE, lang = NULL, fragment = FALSE )
path(str) endpoint
handler(fun) handler; must have arguments
request, response, keys, ... and
set the body to html tags
...(arg) passed to self$router_html()
turbo(opt) include turbo assets
TRUE - include assets with global defaults (default)
FALSE - do not include turbo assets
list() - a list that overrides the default config
root (str) path of the turbo root
libs (str) path of the libraries
force_reload (flg) whether this page will force a reload
progress_bar (flg) whether progress bar is visible
pb_height (css) height of progress bar (top)
pb_delay (int) milliseconds of delay before progress bar appears
pb_color (css) color fo the progress bar
cache_control (str) whether to avoid previewing or caching the page
turbo_opt_in (flg) if TRUE, then turbo is disabled across the page
turbo_socket (flg) add the turbo web socket
app_version (str) a string indicating the version, or NA to disable; used to force reload when assets changed
stimulus(opt) include stimulus controller assets
FALSE - don't include stimulus controllers
TRUE - include default stimulus controllers
character() - vector of paths to stimulus controller JS files;
included along with defaults, include the word
"default" to include the default assets
lang(str) language, defaults to en.
fragment(flg) - is this just a part of a document
clone()The objects of this class are cloneable with this method.
Hotwire$clone(deep = FALSE)
deepWhether to make a deep clone.
Other Hotwire:
hotwire_demo(),
hotwire_modifiers
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.