1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/popover.R
\name{popover}
\alias{popover}
\title{Create a bootstrap button with popover}
\usage{
popover(
title,
content,
header = NULL,
html = TRUE,
class = "btn btn-default",
placement = c("right", "top", "left", "bottom"),
trigger = c("click", "hover", "focus", "manual")
)
}
\arguments{
\item{title}{\code{\link{character}} (\strong{required}):
Title of the button.}
\item{content}{\code{\link{character}} (\strong{required}):
Text to be displayed in the popover.}
\item{header}{\code{\link{character}} (\emph{optional}):
Optional header in the popover.}
\item{html}{\code{\link{logical}} (\emph{with default}):
Insert HTML into the popover.}
\item{class}{\code{\link{logical}} (\emph{with default}):
Bootstrap button class (e.g. "btn btn-danger").}
\item{placement}{\code{\link{character}} (\emph{with default}):
How to position the popover - top | bottom | left | right | auto.
When "auto" is specified, it will dynamically reorient the popover.
For example, if placement is "auto left", the popover will display to the
left when possible, otherwise it will display right.}
\item{trigger}{\code{\link{character}} (\emph{with default}):
How popover is triggered - click | hover | focus | manual.}
}
\description{
Add small overlays of content for housing secondary information.
}
\examples{
# html code
popover("title", "Some content")
# example app
\dontrun{
shinyApp(
ui = fluidPage(
jscolorInput(inputId = "col", label = "JSColor Picker",
value = "21BF6B", position = "right",
mode = "HVS", close = TRUE),
popover(title = "Help!", content = "Call 911"),
plotOutput("plot")
),
server = function(input, output) {
output$plot <- renderPlot({
plot(cars, col = input$col, cex = 2, pch = 16)
})
})
}
}
|