Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

bs_embed_tooltip

Tooltip


Description

A tooltip can be a useful way to add a few words of explanation to a tag.

Usage

bs_embed_tooltip(tag, title = "", placement = "top", ...)

use_bs_tooltip()

Arguments

tag

htmltools::[tag][htmltools::tag], generally <button/> or <a/>, into which to embed the tooltip

title

character, title for the tooltip

placement

character, placement of the tooltip with respect to tag

...

other named arguments, passed to bs_set_data()

Details

To activate the use of tooltips in your page, you will need to call the use_bs_tooltip() function somewhere.

The verb embed is used to signify that you are embedding information into a tag. This implies that you can embed, at most, one "thing" into a particular tag. You should not, for example, expect to embed both a tooltip and a popover into a tag.

Value

htmltools::[tag][htmltools::tag], modified copy of tag

See Also

Examples

library("htmltools")
bs_button("I'm a button") %>%
  bs_embed_tooltip(title = "I'm a tooltip")

bsplus

Adds Functionality to the R Markdown + Shiny Bootstrap Framework

v0.1.2
MIT + file LICENSE
Authors
Ian Lyttle [aut, cre, cph] (<https://orcid.org/0000-0001-9962-4849>), Schneider Electric [cph], Alex Shum [ctb], Emily Bosak [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.