navbar: Add navbar

Description Usage Arguments Author(s) Examples

Description

Add a responsive horizontal navbar.

Usage

 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
bulmaNavbar(
  ...,
  container = TRUE,
  transparent = FALSE,
  color = NULL,
  fix.top = FALSE,
  fix.bottom = FALSE
)

bulmaNavbarStart(...)

bulmaNavbarEnd(...)

bulmaNavbarBrand(...)

bulmaNavbarMenu(...)

bulmaNavbarItem(label, href = NULL)

bulmaNavbarLink(label, href = "")

bulmaNavbarBurger(color = "primary")

bulmaNavbarDropdown(..., label, href = "")

bulmaNav(target, ...)

Arguments

...

any element.

container

If TRUE wraps a bulmaContainer as a children of the section.

transparent

set to have transparent.

color

navbar color.

fix.top, fix.bottom

set one to have navbar fixed at top or bottom of page.

label

item label.

href, target

id of bulmaNav linked, href and target must be identical.

Author(s)

John Coene, jcoenep@gmail.com

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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
if(interactive()){
library(shiny)
shinyApp(
  ui = bulmaPage(
   bulmaNavbar(
     color = "primary",
     bulmaNavbarBrand(
       bulmaNavbarItem(
         "shinybulma",
         href = "Item 1"
       ),
       bulmaNavbarBurger()
     ),
     bulmaNavbarMenu( # not visible on smaller devices
       bulmaNavbarItem(
         "Item 1"
       ),
       bulmaNavbarItem(
         "Item 2"
       ),
       bulmaNavbarItem(
         "Item 3"
       )
    )
   ),
   bulmaNav(
     "Item 1",
     bulmaContainer(
       bulmaTitle("Item 1"),
       bulmaTabs(
       tabs = c("Tab 1", "Tab 2", "Tab 3"),
       center = TRUE,
         bulmaTab(
           "Tab 1",
           bulmaTitle("Tab 1")
         ),
         bulmaTab(
           "Tab 2",
           bulmaTitle("Tab 2"),
           plotOutput("hist")
         ),
         bulmaTab(
           "Tab 3",
           bulmaTitle("Tab 3")
         )
       )
     )
   ),
   bulmaNav(
     "Item 2",
     bulmaContainer(
       bulmaTitle("Item 2"),
       plotOutput("plot2"),
       bulmaTabs(
       tabs = c("Tab 1", "Tab 2", "Tab 3"),
       center = TRUE,
         bulmaTab(
           "Tab 1",
           bulmaTitle("Tab 1")
         ),
         bulmaTab(
           "Tab 2",
           bulmaTitle("Tab 2"),
           plotOutput("plot")
         ),
         bulmaTab(
           "Tab 3",
           bulmaTitle("Tab 3")
         )
       )
     )
   ),
   bulmaNav(
     "Item 3",
     bulmaContainer(
       bulmaTitle("Item 3")
     )
   )
  ),
  server = function(input, output) {
    output$hist <- renderPlot({
      hist(rnorm(20, 10))
    })
    output$plot <- renderPlot({
      plot(1:20, rnorm(20, 20))
    })
    
    output$plot2 <- renderPlot({
      plot(1:20, rnorm(20, 20))
    })
  }
)
}

JohnCoene/shinybulma documentation built on Oct. 17, 2020, 8:57 p.m.