add_tooltip: Add a tooltip for a specific element

View source: R/add_tooltip.R

add_tooltipR Documentation

Add a tooltip for a specific element

Description

Add a tooltip for a specific element

Usage

add_tooltip(
  tag = NULL,
  position = c("top", "bottom", "left", "right"),
  trigger = c("focus", "hover", "hover focus"),
  text = NULL,
  color = c("primary", "secondary", "dark", "light", "info", "danger", "warning",
    "success", "black", "white")
)

Arguments

tag

Element on which a tooltip will be added

position

Tooltip position (top, bottom, left or right)

trigger

Trigger of the tooltip (hover, focus or both)

text

Tooltip message

color

Tooltip color (black and white exclude)

Value

A tooltip for a specific element

Examples

# Simple example
add_tooltip(
tag = shiny::actionButton("btn_id","tooltip"),
position = "top",
trigger = "hover focus",
text = "Tooltip message",
color = "primary"
)
# Advanced example
add_tooltip(
tag = shiny::actionButton("btn_id","tooltip"),
position = "top",
trigger = "hover focus",
text = shiny::icon('github',class='m-1'),
color = "dark"
)

mhanf/multiplyR documentation built on May 17, 2022, 7:41 a.m.