A navbar_options()
object captures options specific to the appearance and
behavior of the navbar, independent from the content displayed on the page.
This helper should be used to create the list of options expected by
navbar_options
in page_navbar()
and navset_bar()
.
Usage
navbar_options(
...,
position = c("static-top", "fixed-top", "fixed-bottom"),
bg = NULL,
inverse = "auto",
collapsible = TRUE,
underline = TRUE
)
Arguments
- ...
Additional arguments are ignored.
...
is included for future expansion onnavbar_options()
.- position
Determines whether the navbar should be displayed at the top of the page with normal scrolling behavior (
"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;}")
- bg
a CSS color to use for the navbar's background color.
- inverse
Either
TRUE
for a light text color orFALSE
for a dark text color. If"auto"
(the default), the best contrast tobg
is chosen.- collapsible
TRUE
to automatically collapse the navigation elements into an expandable menu on mobile devices or narrow window widths.- underline
Whether or not to add underline styling to page or navbar links when active or focused.
Details
Changelog
This function was introduced in bslib v0.9.0, replacing the position
,
bg
, inverse
, collapsible
and underline
arguments of page_navbar()
and navset_bar()
. Those arguments are deprecated with a warning and will be
removed in a future version of bslib.