Create a driver.js callout
Must include shinyVirga::use_driver.js()
in the head of the page.
js_callout.Rd
Create a driver.js callout
Must include shinyVirga::use_driver.js()
in the head of the page.
Usage
js_callout(
id,
title,
description,
position = "bottom-center",
className = "scoped-class",
animate = TRUE,
opacity = 0.75,
padding = 10,
allowClose = TRUE,
overlayClickNext = FALSE,
doneBtnText = "Done",
closeBtnText = "Close",
stageBackground = "#ffffff",
nextBtnText = "Next",
prevBtnText = "Previous",
showButtons = TRUE,
keyboardControl = TRUE,
scrollIntoViewOptions = list(),
onHighlightStarted = NULL,
onHighlighted = NULL,
onDeselected = NULL,
onReset = NULL,
onNext = NULL,
onPrevious = NULL,
asis = FALSE,
animate_el = TRUE,
.ns = ns_find()
)
Arguments
- id
(chr)
Automatically namespaced withns
if inside a module- className
className to wrap driver.js popover
- animate
Whether to animate or not
- opacity
Background opacity (0 means only popovers and without overlay)
- padding
Distance of element from around the edges
- allowClose
Whether the click on overlay should close or not
- overlayClickNext
Whether the click on overlay should move next
- doneBtnText
Text on the final button
- closeBtnText
Text on the close button for this step
- stageBackground
Background color for the staged behind highlighted element
- nextBtnText
Next button text for this step
- prevBtnText
Previous button text for this step
- showButtons
Do not show control buttons in footer
- keyboardControl
Allow controlling through keyboard (escape to close, arrow keys to move)
- scrollIntoViewOptions
We use
scrollIntoView()
when possible, pass here the options for it if you want any- onHighlightStarted
Called when element is about to be highlighted
- onHighlighted
Called when element is fully highlighted
- onDeselected
Called when element has been deselected
- onReset
Called when overlay is about to be cleared
- onNext
Called when moving to next step on any step
- onPrevious
Called when moving to previous step on any step
- asis
If
TRUE
, use the ID as-is even when inside a module (instead of adding the namespace prefix to the ID).- .ns
fun
ns function. Typically found automatically.
See also
Other JS:
js_after()
,
js_callback()
,
js_glow()
,
js_mouseover_once()
,
js_set_input_val()
,
use_driver.js()