| Conductor | R Documentation |
In addition to this page, you can also directly access the documentation of shepherd.js here: https://shepherdjs.dev/docs/index.html.
new()Conductor$new( exitOnEsc = TRUE, keyboardNavigation = TRUE, useModalOverlay = TRUE, classPrefix = NULL, tourName = NULL, stepsContainer = NULL, modalContainer = NULL, confirmCancel = FALSE, confirmCancelMessage = NULL, defaultStepOptions = NULL, mathjax = FALSE, progress = FALSE, onComplete = NULL, onCancel = NULL, onHide = NULL, onShow = NULL, onStart = NULL, onActive = NULL, onInactive = NULL )
exitOnEscAllow closing the tour by pressing "Escape". Default is
TRUE.
keyboardNavigationAllow navigating the tour with keyboard arrows.
Default is TRUE.
useModalOverlayHighlight the tour popover and the element (if
specified). Default is TRUE.
classPrefixAdd a prefix to the classes of the tour. This allows having different CSS for each tour.
tourNameAn (optional) name to give to the tour.
stepsContainerAn optional container element for the steps. If NULL
(default), the steps will be appended to document.body.
modalContainerAn optional container element for the modal. If NULL
(default), the modal will be appended to document.body.
confirmCancelAsk confirmation to cancel the tour. Default is
FALSE.
confirmCancelMessageMessage in the popup that ask confirmation to
close the tour (works only if confirmCancel = TRUE).
defaultStepOptionsA nested list of options to apply to the entire
tour. See Details.
mathjaxEnable MathJax? Default is FALSE. This requires importing
MathJax, for example with shiny::withMathJax().
progressShow a step counter in each step? Default is FALSE.
onCompleteA JavaScript code to run when the tour is completed.
onCancelA JavaScript code to run when the tour is cancelled.
onHideA JavaScript code to run when the tour is hidden.
onShowA JavaScript code to run when the tour is shown.
onStartA JavaScript code to run when the tour starts.
onActiveA JavaScript code to run when the tour is active.
onInactiveA JavaScript code to run when the tour is inactive.
Create a new Conductor object.
A Conductor object.
init()Conductor$init(session = NULL)
sessionA valid Shiny session. If NULL (default), the function
attempts to get the session with shiny::getDefaultReactiveDomain().
Initialise Conductor.
start()Conductor$start(session = NULL)
sessionA valid Shiny session. If NULL (default), the function
attempts to get the session with shiny::getDefaultReactiveDomain().
Start Conductor.
step()Conductor$step( title = NULL, text = NULL, el = NULL, position = NULL, arrow = TRUE, tabId = NULL, tab = NULL, canClickTarget = TRUE, advanceOn = NULL, scrollTo = NULL, cancelIcon = NULL, showOn = NULL, id = NULL, buttons = NULL, classes = NULL, highlightClass = NULL, onComplete = NULL, onCancel = NULL, onHide = NULL, onShow = NULL )
titleTitle of the popover.
textText of the popover.
elThe element to highlight. It can be an id (for example #mynav),
a class (for instance .navbar), or a general tag (for example button).
If NULL (default) or if the selector is not found, the popover will appear
in the center of the page.
positionPosition of the popover relative to the element. Possible values are: 'auto', 'auto-start', 'auto-end', 'top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'right', 'right-start', 'right-end', 'left', 'left-start', 'left-end'.
arrowAdd an arrow pointing towards the highlighted element. Default
is TRUE.
tabIdId of the tabsetPanel().
tabName of the tab that contains the element.
canClickTargetAllow the highlighted element to be clicked. Default
is TRUE.
advanceOnAn action on the page which should advance the tour to the next step. It should be a list with a string selector and an event name.
scrollToShould the element be scrolled to when this step is shown?
Default is TRUE.
cancelIconA list of two elements: enabled is a boolean indicating
whether a "close" icon should be displayed (default is TRUE); label is
the label to add for aria-label.
showOnEither a boolean or a JavaScript expression that returns true
or false. It indicates whether the step should be displayed in the tour.
idName of the step (optional).
buttonsA list of lists. Each "sublist" contains the information
for one button. There are six possible arguments for each button: action
("back" or "next"), text (name of the button), secondary (TRUE/FALSE),
disabled (TRUE/FALSE), label (aria-label of the button), and classes
(for finer CSS customization).
classesA character vector of extra classes to add to the step's content element.
highlightClassAn extra class to apply to el when it is highlighted.
Only one extra class is accepted.
onCompleteSome JavaScript code to run when the step is complete (only for the last step).
onCancelSome JavaScript code to run when the step is cancelled.
onHideSome JavaScript code to run when the step is hidden.
onShowSome JavaScript code to run when the step is shown.
Add a step in a Conductor tour.
updateStepOptions()Conductor$updateStepOptions( step = NULL, title = NULL, text = NULL, el = NULL, position = NULL, arrow = TRUE, tabId = NULL, tab = NULL, canClickTarget = TRUE, advanceOn = NULL, scrollTo = TRUE, cancelIcon = NULL, showOn = NULL, id = NULL, buttons = NULL, classes = NULL, highlightClass = NULL, session = NULL )
stepId of the step (optional). If NULL (default), the current
step is used.
titleTitle of the popover.
textText of the popover.
elThe element to highlight. It can be an id (for example #mynav),
a class (for instance .navbar), or a general tag (for example button).
If NULL (default) or if the selector is not found, the popover will appear
in the center of the page.
positionPosition of the popover relative to the element. Possible values are: 'auto', 'auto-start', 'auto-end', 'top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'right', 'right-start', 'right-end', 'left', 'left-start', 'left-end'.
arrowAdd an arrow pointing towards the highlighted element. Default
is TRUE.
tabIdId of the tabsetPanel().
tabName of the tab that contains the element.
canClickTargetAllow the highlighted element to be clicked. Default
is TRUE.
advanceOnAn action on the page which should advance shepherd to the next step. It should be a list with a string selector and an event name.
scrollToShould the element be scrolled to when this step is shown?
Default is TRUE.
cancelIconA list of two elements: enabled is a boolean indicating
whether a "close" icon should be displayed (default is TRUE); label is
the label to add for aria-label.
showOnEither a boolean or a JavaScript expression that returns true
or false. It indicates whether the step should be displayed in the tour.
idName of the step (optional).
buttonsA list of lists. Each "sublist" contains the information
for one button. There are six possible arguments for each button: action
("back" or "next"), text (name of the button), secondary (TRUE/FALSE),
disabled (TRUE/FALSE), label (aria-label of the button), and classes
(for finer CSS customization).
classesA character vector of extra classes to add to the step's content element.
highlightClassAn extra class to apply to el when it is highlighted.
Only one extra class is accepted.
sessionA valid Shiny session. If NULL (default), the function
attempts to get the session with shiny::getDefaultReactiveDomain().
onShowSome JavaScript code to run when the step is shown.
onHideSome JavaScript code to run when the step is hidden.
onCancelSome JavaScript code to run when the step is cancelled.
onCompleteSome JavaScript code to run when the step is complete (only for the last step).
Modify the options of a specific step.
show()Conductor$show(step = NULL, session = NULL)
stepEither the id of the step to show (defined in $step()) or
its number.
sessionA valid Shiny session. If NULL (default), the function
attempts to get the session with shiny::getDefaultReactiveDomain().
Show a specific step.
remove()Conductor$remove(step = NULL, session = NULL)
stepA character vector with the id(s) of the step(s) to remove
(defined in $step()).
sessionA valid Shiny session. If NULL (default), the function
attempts to get the session with shiny::getDefaultReactiveDomain().
Remove specific step(s).
moveNext()Conductor$moveNext(session = NULL)
sessionA valid Shiny session. If NULL (default), the function
attempts to get the session with shiny::getDefaultReactiveDomain().
Advances the tour to the next step.
moveBack()Conductor$moveBack(session = NULL)
sessionA valid Shiny session. If NULL (default), the function
attempts to get the session with shiny::getDefaultReactiveDomain().
Shows the previous step.
cancel()Conductor$cancel(session = NULL)
sessionA valid Shiny session. If NULL (default), the function
attempts to get the session with shiny::getDefaultReactiveDomain().
Cancels the tour.
complete()Conductor$complete(session = NULL)
sessionA valid Shiny session. If NULL (default), the function
attempts to get the session with shiny::getDefaultReactiveDomain().
Completes the tour.
hide()Conductor$hide(session = NULL)
sessionA valid Shiny session. If NULL (default), the function
attempts to get the session with shiny::getDefaultReactiveDomain().
Hides the current step.
getCurrentStep()Conductor$getCurrentStep(session = NULL)
sessionA valid Shiny session. If NULL (default), the function
attempts to get the session with shiny::getDefaultReactiveDomain().
Get the id of the current step. If no id was specified in $step(),
a random id is generated.
getHighlightedElement()Conductor$getHighlightedElement(session = NULL)
sessionA valid Shiny session. If NULL (default), the function
attempts to get the session with shiny::getDefaultReactiveDomain().
Returns the id of the highlighted element of the current step. If this element has no id, it returns its class.
isOpen()Conductor$isOpen(step = NULL, session = NULL)
stepId of the step (optional). If NULL (default), the current
step is used.
sessionA valid Shiny session. If NULL (default), the function
attempts to get the session with shiny::getDefaultReactiveDomain().
Returns a value TRUE or FALSE indicating whether the step is open.
isActive()Conductor$isActive(session = NULL)
sessionA valid Shiny session. If NULL (default), the function
attempts to get the session with shiny::getDefaultReactiveDomain().
Returns a value TRUE or FALSE indicating whether the tour is active.
clone()The objects of this class are cloneable with this method.
Conductor$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.