Learn R Programming

yonder (version 0.1.0)

tooltip: Tooltips

Description

Add a tooltip to a tag element. Tooltips may be placed above, below, left, or right of an element.

Usage

tooltip(tag, text, placement = "top")

Arguments

tag

A tag element.

text

The tooltip text.

placement

One of "top", "right", "bottom", or "left" specifying what side of the tag element the tooltip appears on.

See Also

Other content: alert, badge, blockquote, card, collapsiblePane, d1, dropdown, img, jumbotron, modal, navContent, popover, pre, progressOutlet, toast

Examples

Run this code
# NOT RUN {
### Tooltips galore

formGroup(
  label = tags$label(
    "An exciting input",
    tooltip(span(icon("info-circle")), "What is exciting here?")
  ),
  radioInput(
    id = "radios",
    choices = c("Ready", "Set", "Go")
  )
)

### Describing links (link inputs)

div(
  p("Nunc rutrum turpis sed pede."),
  p(
    "Donec posuere augue in ",
    linkInput(NULL, "quam.") %>%
      tooltip("This is bound to do something")
  ),
  p(
    "Etiam vel tortor sodales ",
    linkInput(NULL, "tellus") %>%
      tooltip("Tell us more?"),
    " ultricies commodo."
  )
)

# }

Run the code above in your browser using DataLab