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, fluid = TRUE, responsive = NULL, theme = NULL, windowTitle = title)
navbarMenu(title, ..., icon = NULL)
tabPanel
elements to include in the page. The
navbarMenu
function also accepts strings, which will be used as menu
section headers. If the string is a set of dashes like "----"
a
horizontal separator will be displayed in the menu.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
.value
(or, if none was supplied, the title
)
of the tab that should be selected by default. If NULL
, the first
tab will be selected."static-top"
), pinned at
the top ("fixed-top"
), or pinned at the bottom
("fixed-bottom"
). Note that using "fixed-top"
or
"fixed-bottom"
will cause the navbar to overlay your body content,
unless you add padding, e.g.: tags$style(type="text/css", "body
{padding-top: 70px;}")
TRUE
to use a dark background and light text for the
navigation barTRUE
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)collapsible
instead.TRUE
to use a fluid layout. FALSE
to use a fixed
layout.www/bootstrap.css
you would use theme = "bootstrap.css"
.title
is not a string.navbarMenu
tab.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
navbarPage("App Title",
tabPanel("Plot"),
tabPanel("Summary"),
tabPanel("Table")
)
navbarPage("App Title",
tabPanel("Plot"),
navbarMenu("More",
tabPanel("Summary"),
"----",
"Section header",
tabPanel("Table")
)
)
Run the code above in your browser using DataLab