View source: R/microtip-handler.R
useMicroTip | R Documentation |
Minimal CSS only tooltip.
useMicroTip()
microTip(
id = NULL,
tip = "Hey! tooltip!",
position = "top",
size = NULL,
session = getDefaultReactiveDomain()
)
id |
The id of the element to attach the tooltip. |
tip |
Content of the tooltip. |
position |
Where the tooltip should appear relative to the target element. Defaults to
|
size |
Size of the tooltip. Defaults to
|
session |
Shiny session object. |
None
useMicroTip
: Dependencies to include in your UI.
microTip
: Add tooltip.
if (interactive()) {
library(shiny)
library(standby)
ui <- fluidPage(
useMicroTip(), # include dependencies
br(), br(), br(), br(),
actionButton(inputId = "btn",
label = "MicroTip Demo")
)
server <- function(input, output, session) {
# display tooltip
microTip(id = "btn",
tip = "Hey there! This is a micro tip!",
position = "bottom-right")
}
shinyApp(ui, server)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.