if(interactive()){
library(shiny)
library(magrittr)
ui <- fluidPage(
br(), br(), br(), br(), br(), br(), column(2),
actionButton("", "Tooltip on the left") %>%
bsTooltip("Tooltip on the left", "left"),
actionButton("", "Tooltip on the top") %>%
bsTooltip("Tooltip on the top", "top"),
actionButton("", "Tooltip on the right") %>%
bsTooltip("Tooltip on the right", "right"),
actionButton("", "Tooltip on the bottom") %>%
bsTooltip("Tooltip on the bottom", "bottom"),
br(), br(), column(2),
actionButton("", "primary color") %>%
bsTooltip("primary color", bgcolor = "#0275d8"),
actionButton("", "danger color") %>%
bsTooltip("danger color", bgcolor = "#d9534f"),
actionButton("", "warning color") %>%
bsTooltip("warning color", bgcolor = "#f0ad4e"),
br(), br(), column(2),
actionButton("", "9px") %>%
bsTooltip("9px", fontsize = "9px"),
actionButton("", "14px") %>%
bsTooltip("14px", fontsize = "14px"),
actionButton("", "20px") %>%
bsTooltip("20px", fontsize = "20px"),
br(), br(), column(2),
actionButton("", "combined") %>%
bsTooltip(
"custom tooltip", "bottom",
"#0275d8", "#eee", "15px"
),
actionButton("", "Clickable with links") %>%
bsTooltip(
"This message has a link", "bottom",
html = TRUE, click_inside = TRUE, bgcolor = "orange"
)
)
server <- function(input, output, session) {}
shinyApp(ui, server)
}
if(interactive()){
library(shiny)
library(magrittr)
ui <- fluidPage(
br(), br(), br(), br(), br(), br(), column(2),
actionButton("", "primary") %>%
bsTip("primary", status = "primary"),
actionButton("", "info") %>%
bsTip("info", status = "info"),
actionButton("", "success") %>%
bsTip("success", status = "success"),
actionButton("", "warning") %>%
bsTip("warning", status = "warning"),
actionButton("", "danger") %>%
bsTip("danger", status = "danger")
)
server <- function(input, output, session) {}
shinyApp(ui, server)
}
Run the code above in your browser using DataLab