Learn R Programming

shinyBS (version 0.20)

bsNavBar: Twitter Bootstrap Navbar

Description

Create and modify a shell for a Twitter Bootstrap Navbar that can hold shiny input (and output) elements.

Usage

bsNavBar(inputId, brand, ..., rightItems, fixed = FALSE, inverse = FALSE)
updateNavBar(session, inputId, brand=NULL, fixed=NULL, inverse=NULL)

Arguments

session
The session object passed to function given to shinyServer
inputId
Input variable to assign the control's value to
brand
A word or two that will appear at the left of the navbar
...
UI elements to include within the navbar. These will align to the left
rightItems
a list of UI elements you wish to align to the right
fixed
Should the navbar be fixed to the top of the page logical
inverse
Should the inverse navbar style be used logical

References

http://getbootstrap.com/2.3.2/components.html{Navbars for Twitter Bootstrap 2.3.2}

Examples

Run this code
## In ui.R
  ## Create a navBar with the brand "shinyBS" that is fixed to the top of the page
  bsNavBar("nb1", brand="shinyBS", fixed=TRUE, 
           leftItems = list(<misc navbar elements>),
           rightItems = list(<more navbar elements>))
           
  ## In server.R
  ## Change to the inverse style of navBar
  modifyNavBar(session, inputId="nb1", inverse=TRUE)

Run the code above in your browser using DataLab