popover: Create a bootstrap button with popover

Description Usage Arguments Examples

View source: R/popover.R

Description

Add small overlays of content for housing secondary information.

Usage

1
2
3
popover(title, content, header = NULL, html = TRUE,
  class = "btn btn-default", placement = c("right", "top", "left",
  "bottom"), trigger = c("click", "hover", "focus", "manual"))

Arguments

title

character (required): Title of the button.

content

character (required): Text to be displayed in the popover.

header

character (optional): Optional header in the popover.

html

logical (with default): Insert HTML into the popover.

class

logical (with default): Bootstrap button class (e.g. "btn btn-danger").

placement

character (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.

trigger

character (with default): How popover is triggered - click | hover | focus | manual.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# html code
popover("title", "Some content")

# example app
## Not run: 
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)
 })
})

## End(Not run)

RLumShiny documentation built on June 26, 2017, 5:03 p.m.