Create a page that contains a top level navigation bar that can be used to
toggle a set of tabPanel()
elements.
navbarPage( title, ..., id = NULL, selected = NULL, position = c("static-top", "fixed-top", "fixed-bottom"), header = NULL, footer = NULL, inverse = FALSE, collapsible = FALSE, collapsable = deprecated(), fluid = TRUE, responsive = deprecated(), theme = NULL, windowTitle = title, lang = NULL ) navbarMenu(title, ..., menuName = title, icon = NULL)
title | The title to display in the navbar |
---|---|
... |
|
id | If provided, you can use |
selected | The |
position | Determines whether the navbar should be displayed at the top
of the page with normal scrolling behavior ( |
header | Tag or 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 |
|
collapsible |
|
collapsable | Deprecated; use |
fluid |
|
responsive | This option is deprecated; it is no longer optional with Bootstrap 3. |
theme | Alternative Bootstrap stylesheet (normally a css file within the
www directory). For example, to use the theme located at
|
windowTitle | The title that should be displayed by the browser window.
Useful if |
lang | ISO 639-1 language code for the HTML page, such as "en" or "ko".
This will be used as the lang in the |
menuName | A name that identifies this |
icon | Optional icon to appear on a |
A UI defintion that can be passed to the shinyUI function.
The navbarMenu
function can be used to create an embedded
menu within the navbar that in turns includes additional tabPanels (see
example below).
tabPanel()
, tabsetPanel()
,
updateNavbarPage()
, insertTab()
,
showTab()
Other layout functions:
fillPage()
,
fixedPage()
,
flowLayout()
,
fluidPage()
,
sidebarLayout()
,
splitLayout()
,
verticalLayout()
#> <nav class="navbar navbar-default navbar-static-top" role="navigation"> #> <div class="container-fluid"> #> <div class="navbar-header"> #> <span class="navbar-brand">App Title</span> #> </div> #> <ul class="nav navbar-nav" data-tabsetid="1883"> #> <li class="active"> #> <a href="#tab-1883-1" data-toggle="tab" data-value="Plot">Plot</a> #> </li> #> <li> #> <a href="#tab-1883-2" data-toggle="tab" data-value="Summary">Summary</a> #> </li> #> <li> #> <a href="#tab-1883-3" data-toggle="tab" data-value="Table">Table</a> #> </li> #> </ul> #> </div> #> </nav> #> <div class="container-fluid"> #> <div class="tab-content" data-tabsetid="1883"> #> <div class="tab-pane active" data-value="Plot" id="tab-1883-1"></div> #> <div class="tab-pane" data-value="Summary" id="tab-1883-2"></div> #> <div class="tab-pane" data-value="Table" id="tab-1883-3"></div> #> </div> #> </div>navbarPage("App Title", tabPanel("Plot"), navbarMenu("More", tabPanel("Summary"), "----", "Section header", tabPanel("Table") ) )#> <nav class="navbar navbar-default navbar-static-top" role="navigation"> #> <div class="container-fluid"> #> <div class="navbar-header"> #> <span class="navbar-brand">App Title</span> #> </div> #> <ul class="nav navbar-nav" data-tabsetid="4334"> #> <li class="active"> #> <a href="#tab-4334-1" data-toggle="tab" data-value="Plot">Plot</a> #> </li> #> <li class="dropdown"> #> <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-value="More"> #> More #> <b class="caret"></b> #> </a> #> <ul class="dropdown-menu" data-tabsetid="6226"> #> <li> #> <a href="#tab-6226-1" data-toggle="tab" data-value="Summary">Summary</a> #> </li> #> <li class="divider"></li> #> <li class="dropdown-header">Section header</li> #> <li> #> <a href="#tab-6226-4" data-toggle="tab" data-value="Table">Table</a> #> </li> #> </ul> #> </li> #> </ul> #> </div> #> </nav> #> <div class="container-fluid"> #> <div class="tab-content" data-tabsetid="4334"> #> <div class="tab-pane active" data-value="Plot" id="tab-4334-1"></div> #> <div class="tab-pane" data-value="Summary" id="tab-6226-1"></div> #> <div class="tab-pane" data-value="Table" id="tab-6226-4"></div> #> </div> #> </div>