turbo_frame: Turbo Frame

Description Usage Arguments See Also

View source: R/turbo-frame.R

Description

Turbo Frames allow predefined parts of a page to be updated on request. Any links and forms inside a frame are captured, and the frame contents automatically updated after receiving a response. Regardless of whether the server provides a full document, or just a fragment containing an updated version of the requested frame, only that particular frame will be extracted from the response to replace the existing content.

Documentation

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
turbo_frame(
  id,
  ...,
  src = NULL,
  target = NULL,
  loading = c("eager", "lazy"),
  disabled = FALSE,
  autoscroll = c("start", "end", "center", "nearest"),
  env = parent.frame()
)

Arguments

id

(str) unique identifier

...

(tag) content of the element

src

(str) path for lazy loading of the content

target

(str) target of any links clicked in this:

  • NULL - the frame itself

  • "_top" - the whole window

  • "<id>" - a specific frame outside tof the current frame

loading

(str) defines loading behavior

  • eager - immediately navigating

  • lazy - only hwne element is visible in the viewport

disabled

(flg) navigation will not trigger if present

autoscroll

(str) whether to scroll to that area when it's loaded.

env

(env) calling environment

See Also

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


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