buildTooltipOrPopoverOptionsList | R Documentation |
This function creates a custom tooltip for a given element in a Shiny application. The implementation is based on the shinyBS package.
buildTooltipOrPopoverOptionsList(title, placement, trigger, options, content)
title |
The text for the tooltip's title. |
placement |
Placement of the tooltip. One of 'top', 'bottom', 'left', or 'right'. |
trigger |
The events that trigger the tooltip. One or more of 'click', 'hover', 'focus', or 'manual'. |
options |
A list of additional options for the tooltip. |
content |
Optional HTML content for the tooltip. |
A list of tooltip options to be used in the Shiny application.
https://CRAN.R-project.org/package=shinyBS
## Not run:
tooltip_options <- custom_tooltip(
title = "Sample tooltip",
placement = "top",
trigger = "hover",
options = list(delay = 100),
content = "This is a custom tooltip."
)
# In a Shiny app
# shiny::tags$span("Hover me!", `data-toggle` = "tooltip",
`data-placement` = "top", `data-trigger` = "hover",
`title` = "Hello, tooltip!")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.