TooltipHost {shiny.fluent}R Documentation

Tooltip

Description

A good tooltip briefly describes unlabeled controls or provides a bit of additional information about labeled controls, when this is useful. It can also help customers navigate the UI by offering additional—not redundant—information about control labels, icons, and links. A tooltip should always add valuable information; use sparingly.

There are two components you can use to display a tooltip:

For more details and examples visit the official docs. The R package cannot handle each and every case, so for advanced use cases you need to work using the original docs to achieve the desired result.

Usage

TooltipHost(...)

Arguments

...

Props to pass to the component. The allowed props are listed below in the Details section.

Details

If set, only show the tooltip if the specified element (Self or Parent) has overflow. When set to Parent, the parent element is also used as the tooltip's target element.

Note that even with Self mode, the TooltipHost does not check whether any children have overflow.

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.

Best practices

Content

For a UI label that needs some explanation:

For a truncated label or a label that’s likely to truncate in some languages:

Examples

library(shiny)
library(shiny.fluent)

ui <- function(id) {
  ns <- NS(id)
  TooltipHost(
    content = "This is the tooltip content",
    delay = 0,
    Text("Hover over me")
  )
}

server <- function(id) {
  moduleServer(id, function(input, output, session) {})
}

if (interactive()) {
  shinyApp(ui("app"), function(input, output) server("app"))
}

[Package shiny.fluent version 0.4.0 Index]