methods: Methods

methodsR Documentation

Methods

Description

Call tippy methods on tooltips.

Usage

tippy_disable(
  selectors = NULL,
  .session = shiny::getDefaultReactiveDomain(),
  .is_tag = FALSE
)

tippy_enable(
  selectors = NULL,
  .session = shiny::getDefaultReactiveDomain(),
  .is_tag = FALSE
)

tippy_destroy(
  selectors = NULL,
  .session = shiny::getDefaultReactiveDomain(),
  .is_tag = FALSE
)

tippy_show(
  selectors = NULL,
  .session = shiny::getDefaultReactiveDomain(),
  .is_tag = FALSE
)

tippy_hide(
  selectors = NULL,
  .session = shiny::getDefaultReactiveDomain(),
  .is_tag = FALSE
)

Arguments

selectors

Selectors of tooltips to apply the method. If 'NULL' then the method is applied to _all tooltips._

.session

A valid shiny session.

.is_tag

Whether 'selectors' are tags, e.g.: '<p>'.

Examples

library(shiny)
library(tippy)

ui <- fluidPage(
  useTippy(),
  h5("plot tooltip", class = "tip"),
  p("Another tooltip", class = "tip"),
  tippyThis(
    ".tip",
    "This is indeed a tooltip"
  ),
  actionButton("disable", "Disable"),
  actionButton("enable", "Enable")
)

server <- function(input, output) {
  observeEvent(input$disable, {
    tippy_disable()
  });

  observeEvent(input$enable, {
    tippy_enable()
  })
}

if(FALSE) {
 shinyApp(ui, server)
}


JohnCoene/tippy documentation built on April 16, 2023, 2:37 p.m.