navbarPage: Create a page with a top level navigation bar

Description Usage Arguments Details Value See Also Examples

View source: R/page.R

Description

Create a page that contains a top level navigation bar that can be used to toggle a set of tabPanel elements.

Usage

1
2
3
navbarPage(title, ..., id = NULL, header = NULL, footer = NULL,
  inverse = FALSE, collapsable = FALSE, fluid = TRUE, responsive = TRUE,
  theme = NULL, windowTitle = title)

Arguments

title

The title to display in the navbar

...

tabPanel elements to include in the page

id

If provided, you can use input$id in your server logic to determine which of the current tabs is active. The value will correspond to the value argument that is passed to tabPanel.

header

Tag of list of tags to display as a common header above all tabPanels.

footer

Tag or list of tags to display as a common footer below all tabPanels

inverse

TRUE to use a dark background and light text for the navigation bar

collapsable

TRUE to 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)

fluid

TRUE to use a fluid layout. FALSE to use a fixed layout.

responsive

TRUE to use responsive layout (automatically adapt and resize page elements based on the size of the viewing device)

theme

Alternative Bootstrap stylesheet (normally a css file within the www directory). For example, to use the theme located at www/bootstrap.css you would use theme = "bootstrap.css".

windowTitle

The title that should be displayed by the browser window. Useful if title is not a string.

Details

The navbarMenu function can be used to create an embedded menu within the navbar that in turns includes additional tabPanels (see example below).

Value

A UI defintion that can be passed to the shinyUI function.

See Also

tabPanel, tabsetPanel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
navbarPage("App Title",
  tabPanel("Plot"),
  tabPanel("Summary"),
  tabPanel("Table")
)

navbarPage("App Title",
  tabPanel("Plot"),
  navbarMenu("More",
    tabPanel("Summary"),
    tabPanel("Table")
  )
)

## End(Not run)

shinybootstrap2 documentation built on May 2, 2019, 4:05 p.m.