| add_tooltip | R Documentation |
Add a tooltip for a specific element
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")
)
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) |
A tooltip for a specific element
# 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"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.