turbo_assets: Turbo CSS/JS dependencies

Description Usage Arguments See Also

View source: R/turbo-assets.R

Description

Generates the Turbo JS dependencies with specific configurations applied. Include this in any page to enable Turbo functionality in it.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
turbo_assets(
  root = NULL,
  libs = "assets",
  force_reload = FALSE,
  progress_bar = TRUE,
  pb_height = "5px",
  pb_color = "#008080",
  pb_delay = 500,
  cache_control = c("no-preview", "no-cache"),
  turbo_opt_in = FALSE,
  turbo_socket = TRUE,
  app_version = NA_character_
)

Arguments

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_color

(css) color fo the progress bar

pb_delay

(int) milliseconds of delay before progress bar appears

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 change

See Also

Other Turbo: turbo_frame(), turbo_link(), turbo_listener(), turbo_modifiers, turbo_stream(), turbo


tjpalanca/hotwire.R documentation built on Dec. 23, 2021, 10:59 a.m.