Learn R Programming

formods (version 0.2.1)

FM_add_ui_tooltip: Add Tooltip to UI Element

Description

Adds a tool tip to a user element.

Usage

FM_add_ui_tooltip(
  state,
  uiele,
  tooltip = "mytooltip",
  position = "right",
  size = "medium"
)

Value

If tooltips are enabled and the suggested packages are installed then a uiele with the tooltip added will be returned. Otherwise it will just return the original uiele unchanged.

Arguments

state

Current module state after yaml file has been read.

uiele

UI element to add the toooltip to.

tooltip

Text containing the tool tip.

position

Position of the tooltip.

size

size of the tooltip

Examples

Run this code
if(interactive()){
# We need a module state object to use this function:
sess_res = UD_test_mksession()
state = sess_res$state
uiele = shiny::textInput(inputId = "my input", label="example input")

uiele = FM_add_ui_tooltip(state, uiele)
}

Run the code above in your browser using DataLab