Nothing
#' Tooltip
#'
#' Add a tooltip to an element by attaching `data-tooltip` attributes.
#'
#' @param tag The element to attach the tooltip to.
#' @param text The tooltip text.
#' @param placement Tooltip placement: `"top"`, `"bottom"`, `"left"`,
#' or `"right"`.
#'
#' @return The element with tooltip attributes added.
#' @export
#'
#' @examples
#' ds_tooltip(
#' ds_button("Hover me"),
#' text = "This is helpful information"
#' )
ds_tooltip <- function(tag, text, placement = "top") {
tag <- htmltools::tagAppendAttributes(
tag,
`data-tooltip` = text,
`data-tooltip-placement` = placement
)
htmltools::attachDependencies(tag, ds_dependencies())
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.