library(shinypanels)
styles <- "
.info-tool {
display: flex;
}
.tooltip-inf {
cursor: pointer;
position: relative;
margin-left: 3px;
}
.tooltip-inf .tooltiptext {
visibility: hidden;
width: 170px;
higth: auto;
background-color: #fafafa;
color: #9FBD36;
position: absolute;
z-index: 9999;
top: 0;
padding: 1rem;
border: 1px solid #ccc;
font-weight: 400;
letter-spacing: normal;
font-size: 0.75rem;
}
.tooltip-inf:hover .tooltiptext {
visibility: visible;
}
"
ui <- panelsPage( styles = styles,
panel(title = "example",
head = NULL,
body = uiOutput('ejemplo')
)
)
server <- function(input, output, session) {
output$ejemplo <- renderUI({
div(
HTML('<div class= "info-tool"> Plot type <div class="tooltip-inf">
<i class="fa fa-info-circle"></i><span class="tooltiptext">
Its a tootip information </span</div></div></div>'),
radioButtons('plot_type', ' ', c("ggplot", "hgchmagic")))
})
}
shinyApp(ui, server)