Create a page with a top level navigation bar
Create a page that contains a top level navigation bar that can be used to
toggle a set of
navbarPage(title, ..., id = NULL, header = NULL, footer = NULL, inverse = FALSE, collapsable = FALSE, fluid = TRUE, responsive = TRUE, theme = NULL)
navbarMenu(title, ..., icon = NULL)
- The title to display in the navbar
tabPanelelements to include in the page
- If provided, you can use
idin your server logic to determine which of the current tabs is active. The value will correspond to the
valueargument that is passed to
- Tag of list of tags to display as a common header above all tabPanels.
- Tag or list of tags to display as a common footer below all tabPanels
TRUEto use a dark background and light text for the navigation bar
TRUEto automatically collapse the navigation elements into a menu when the width of the browser is less than 940 pixels (useful for viewing on smaller touchscreen device)
TRUEto use a fluid layout.
FALSEto use a fixed layout.
TRUEto use responsive layout (automatically adapt and resize page elements based on the size of the viewing device)
- Alternative Bootstrap stylesheet (normally a
css file within the www directory). For example, to use
the theme located at
www/bootstrap.cssyou would use
theme = "bootstrap.css".
- Optional icon to appear on a
navbarMenu function can be used to create an embedded
menu within the navbar that in turns includes additional tabPanels (see
- A UI defintion that can be passed to the shinyUI function.
shinyUI(navbarPage("App Title", tabPanel("Plot"), tabPanel("Summary"), tabPanel("Table") )) shinyUI(navbarPage("App Title", tabPanel("Plot"), navbarMenu("More", tabPanel("Summary"), tabPanel("Table") ) ))