tabler_navbar: Create the Tabler navbar

Description Usage Arguments Value Examples

View source: R/tabler.R

Description

Create the Tabler navbar

Usage

1
2
3
4
5
6
7
tabler_navbar(
  ...,
  brand_url = NULL,
  brand_image = NULL,
  nav_menu,
  nav_right = NULL
)

Arguments

...

Extra elements.

brand_url

Navbar brand url.

brand_image

Navbar brand image.

nav_menu

Slot for tabler_navbar_menu.

nav_right

Right elements.

Value

The navbar HTML tag, which drives the template navigation.

Examples

 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
42
43
44
45
if (interactive()) {
 library(shiny)

 # example without JS
 ui <- tabler_page(
  tabler_navbar(
    brand_url = "https://preview-dev.tabler.io",
    brand_image = "https://preview-dev.tabler.io/static/logo.svg",
    nav_menu = tabler_navbar_menu(
      tabler_navbar_menu_item(
        text = "Tab 1",
        icon = NULL,
        tabName = "tab1",
        selected = TRUE
      ),
      tabler_navbar_menu_item(
        text = "Tab 2",
        icon = NULL,
        tabName = "tab2"
      )
    )
  ),
  tabler_body(
    tabler_tab_items(
      tabler_tab_item(
        tabName = "tab1",
        p("Hello World")
      ),
      tabler_tab_item(
        tabName = "tab2",
        p("Second Tab")
      )
    ),
    footer = tabler_footer(
      left = "Rstats, 2020",
      right = a(href = "https://www.google.com")
    )
  )
 )
 server <- function(input, output) {}
 shinyApp(ui, server)

 # example with custom JS code to activate tabs
 shinyAppDir(system.file("tabler/tabler_tabs", package = "OSUICode"))
}

DivadNojnarg/outstanding-shiny-ui-code documentation built on Nov. 2, 2021, 12:03 p.m.