buildTooltipOrPopoverOptionsList: Custom tooltip function

buildTooltipOrPopoverOptionsListR Documentation

Custom tooltip function

Description

This function creates a custom tooltip for a given element in a Shiny application. The implementation is based on the shinyBS package.

Usage

buildTooltipOrPopoverOptionsList(title, placement, trigger, options, content)

Arguments

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.

Value

A list of tooltip options to be used in the Shiny application.

See Also

https://CRAN.R-project.org/package=shinyBS

Examples

## 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)

QurvE documentation built on May 29, 2024, 3 a.m.