Learn R Programming

shinyBS (version 0.20)

addPopover: Twitter Bootstrap Popovers

Description

Functions to add Twitter Bootstrap popovers in shiny.

Usage

addPopover(session, id, title = "", content, 
             placement = "right", trigger = "click")
  bsPopover(id, title = "", content, 
            placement = "right", trigger = "click")
  removePopover(session, id)

Arguments

session
The session object passed to function given to shinyServer
id
The inputId of the object to add the popover to
title
The title of the popover
content
The main content of the popover
placement
Where the popover should appear in relation to the object. Acceptable values are bottom, top, left, and right.
trigger
What action will make the popover appear. Common values are hover or click.

Details

bsPopover is called from ui.R and will add a

References

http://getbootstrap.com/2.3.2/javascript.html{Popovers for Twitter Bootstrap 2.3.2}

Examples

Run this code
## From ui.R: Adds a popover to element with inputId = "someInput" 
  ## with title, "Popover", and text, "This is an input.", that appears to the left on click.
  bsPopover(id = "someInput", title="Popover", content = "This is an input", 
            placement = "left", trigger = "click")
  
  ## From server.R: Add the same popover as above
  addPopover(session, id="someInput", title="popover", content = "This is an input.",
             placement = "left", trigger = "click")

Run the code above in your browser using DataLab