Page with a navbar

Description

A sticky top navigation bar over a <main> region.

Usage

bc_page_navbar(
  ...,
  title = NULL,
  nav = NULL,
  end = NULL,
  href = NULL,
  aria_label = "Main navigation"
)

bc_nav_item(label, href = NULL, ..., current = FALSE, disabled = FALSE)

Arguments

Argument Description
... Tag attributes and children for the <main> content region.
title String or tag. The brand, shown first.
nav Tag or list. Navigation controls, usually bc_nav_item()s.
end Tag or NULL. Content aligned to the end of the bar, such as bc_theme_switcher() or a bc_dropdown_menu().
href String or NULL. Makes the brand a link.
aria_label String. Accessible name for the <nav> landmark.
label String or tag. The item's text.
current Bool. Marks the item as the current page.
disabled Bool. Whether the item is disabled.

Value

A htmltools::tagList() of the <header> and the <main>.

See Also

bc_page_sidebar()

Examples

bc_page_navbar(
  htmltools::h2("Overview"),
  title = "Acme",
  href = "/",
  nav = list(
    bc_nav_item("Home", href = "/", current = TRUE),
    bc_nav_item("Reports", href = "/reports")
  ),
  end = bc_theme_switcher()
)
Acme

Overview


bc_nav_item("Reports", href = "/reports", current = TRUE)
Reports