Drop files here
or click to upload
library(shiny)
library(bslib)
ui <- page_fluid(
theme = bs_theme(),
# Basic tooltip example
div(
style = "margin: 20px;",
tooltip(
"Hover over me",
"This is a tooltip!",
placement = "top"
)
),
# Additional examples showing different placements
div(
style = "margin: 20px; display: flex; gap: 20px;",
tooltip(
actionButton("btn1", "Left Tooltip"),
"Tooltips can be on buttons too!",
placement = "left"
),
tooltip(
span("Bottom Tooltip", style = "padding: 10px; border: 1px solid #ccc; border-radius: 4px;"),
"This tooltip appears below",
placement = "bottom"
),
tooltip(
tags$b("Right Tooltip"),
"And this one's on the right",
placement = "right"
)
)
)
server <- function(input, output, session) {
# No server logic needed for this demo
}
shinyApp(ui, server)
Hi! I can help you with any questions about Shiny and R. What would you like to know?