Debian Codegraph @

man/navbarPage.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/bootstrap.R
3 \name{navbarPage}
4 \alias{navbarPage}
5 \alias{navbarMenu}
6 \title{Create a page with a top level navigation bar}
7 \usage{
8 navbarPage(
9 title,
10 ...,
11 id = NULL,
12 selected = NULL,
13 position = c("static-top", "fixed-top", "fixed-bottom"),
14 header = NULL,
15 footer = NULL,
16 inverse = FALSE,
17 collapsible = FALSE,
18 fluid = TRUE,
19 theme = NULL,
20 windowTitle = NA,
21 lang = NULL
22 )
23
24 navbarMenu(title, ..., menuName = title, icon = NULL)
25 }
26 \arguments{
27 \item{title}{The title to display in the navbar}
28
29 \item{...}{\code{\link[=tabPanel]{tabPanel()}} elements to include in the page. The
30 \code{navbarMenu} function also accepts strings, which will be used as menu
31 section headers. If the string is a set of dashes like \code{"----"} a
32 horizontal separator will be displayed in the menu.}
33
34 \item{id}{If provided, you can use \verb{input$}\emph{\code{id}} in your
35 server logic to determine which of the current tabs is active. The value
36 will correspond to the \code{value} argument that is passed to
37 \code{\link[=tabPanel]{tabPanel()}}.}
38
39 \item{selected}{The \code{value} (or, if none was supplied, the \code{title})
40 of the tab that should be selected by default. If \code{NULL}, the first
41 tab will be selected.}
42
43 \item{position}{Determines whether the navbar should be displayed at the top
44 of the page with normal scrolling behavior (\code{"static-top"}), pinned at
45 the top (\code{"fixed-top"}), or pinned at the bottom
46 (\code{"fixed-bottom"}). Note that using \code{"fixed-top"} or
47 \code{"fixed-bottom"} will cause the navbar to overlay your body content,
48 unless you add padding, e.g.: \code{tags$style(type="text/css", "body
49 {padding-top: 70px;}")}}
50
51 \item{header}{Tag or list of tags to display as a common header above all
52 tabPanels.}
53
54 \item{footer}{Tag or list of tags to display as a common footer below all
55 tabPanels}
56
57 \item{inverse}{\code{TRUE} to use a dark background and light text for the
58 navigation bar}
59
60 \item{collapsible}{\code{TRUE} to automatically collapse the navigation
61 elements into an expandable menu on mobile devices or narrow window widths.}
62
63 \item{fluid}{\code{TRUE} to use a fluid layout. \code{FALSE} to use a fixed
64 layout.}
65
66 \item{theme}{One of the following:
67 \itemize{
68 \item \code{NULL} (the default), which implies a "stock" build of Bootstrap 3.
69 \item A \code{\link[bslib:bs_theme]{bslib::bs_theme()}} object. This can be used to replace a stock
70 build of Bootstrap 3 with a customized version of Bootstrap 3 or higher.
71 \item A character string pointing to an alternative Bootstrap stylesheet
72 (normally a css file within the www directory, e.g. \code{www/bootstrap.css}).
73 }}
74
75 \item{windowTitle}{the browser window title (as a character string). The
76 default value, \code{NA}, means to use any character strings that appear in
77 \code{title} (if none are found, the host URL of the page is displayed by
78 default).}
79
80 \item{lang}{ISO 639-1 language code for the HTML page, such as "en" or "ko".
81 This will be used as the lang in the \code{<html>} tag, as in \code{<html lang="en">}.
82 The default (NULL) results in an empty string.}
83
84 \item{menuName}{A name that identifies this \code{navbarMenu}. This
85 is needed if you want to insert/remove or show/hide an entire
86 \code{navbarMenu}.}
87
88 \item{icon}{Optional icon to appear on a \code{navbarMenu} tab.}
89 }
90 \value{
91 A UI definition that can be passed to the \link{shinyUI} function.
92 }
93 \description{
94 Create a page that contains a top level navigation bar that can be used to
95 toggle a set of \code{\link[=tabPanel]{tabPanel()}} elements.
96 }
97 \details{
98 The \code{navbarMenu} function can be used to create an embedded
99 menu within the navbar that in turns includes additional tabPanels (see
100 example below).
101 }
102 \examples{
103 navbarPage("App Title",
104 tabPanel("Plot"),
105 tabPanel("Summary"),
106 tabPanel("Table")
107 )
108
109 navbarPage("App Title",
110 tabPanel("Plot"),
111 navbarMenu("More",
112 tabPanel("Summary"),
113 "----",
114 "Section header",
115 tabPanel("Table")
116 )
117 )
118 }
119 \seealso{
120 \code{\link[=tabPanel]{tabPanel()}}, \code{\link[=tabsetPanel]{tabsetPanel()}},
121 \code{\link[=updateNavbarPage]{updateNavbarPage()}}, \code{\link[=insertTab]{insertTab()}},
122 \code{\link[=showTab]{showTab()}}
123
124 Other layout functions:
125 \code{\link{fillPage}()},
126 \code{\link{fixedPage}()},
127 \code{\link{flowLayout}()},
128 \code{\link{fluidPage}()},
129 \code{\link{sidebarLayout}()},
130 \code{\link{splitLayout}()},
131 \code{\link{verticalLayout}()}
132 }
133 \concept{layout functions}