navbar: Navigation bar

View source: R/navbar.R

navbarR Documentation

Navigation bar

Description

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.

Usage

navbar(..., brand = NULL, collapse = NULL)

Arguments

...

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 NULL, in which case nothing is added.

collapse

One of "sm", "md", "lg", "xl", or NULL specifying the breakpoint at which the navbar collaspes, defaults to NULL, in which case the navbar is always expanded.

Details

Navbar with tabs

div(
  navbar(
    brand = "Navbar",
    navInput(
      .style %>%
        margin(right = "auto"),
      id = NULL,
      choices = c("Home", "About", "Our process")
    ),
    formInput(
      inline = TRUE,
      id = NULL,
      textInput(
        .style %>%
          margin(right = c(sm = 2)),
        type = "search",
        id = NULL,
        placeholder = "Search"
      ),
      formSubmit(
        .style %>%
          background("primary"),
        label = "Search",
        value = "search"
      )
    )
  ),
  container(
    p(". . .")
  )
)

. . .

See Also

Other layout functions: column(), fieldset(), webpage()


nteetor/yonder documentation built on June 8, 2022, 1:36 p.m.