Description Usage Arguments See Also Examples
Add a navigation bar to your application with navbar()
. Navigation bars may
include a tab toggle (useful for multi-page applications), inline forms
(perhaps a search feature or login item), or character strings to add simple
text. Navbars are responsive and will collapse on small screens, think mobile
device. A button is automatically added to toggle between the collapsed and
expanded states.
1 |
... |
A tab toggle, inline forms, or text to add to include as part of the navigation bar. |
brand |
A tag element or text placed on the left end of the navbar,
defaults to |
collapse |
One of |
Other layout functions:
column()
,
fieldset()
,
flex()
,
responsive
,
webpage()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | ### Navbar with tabs
div(
navbar(
brand = "Navbar",
navInput(
id = "tabs",
choices = c("Home", "About", "Our process")
) %>%
margin(right = "auto"),
formInput(
inline = TRUE,
id = "navForm",
textInput(
type = "search",
id = "site_search",
placeholder = "Search"
) %>%
margin(right = c(sm = 2)),
formSubmit(
label = "Search",
value = "search"
) %>%
background("amber")
)
) %>%
background("teal"),
container(
navContent(
navPane(
h3("Home")
),
navPane(
h3("About")
),
navPane(
h3("The process")
)
)
)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.