UIkitNavbar: Create an UIkit navigation bar container

Description Usage Arguments Author(s) Examples

View source: R/UIkitNavbar.R

Description

Create a navigation bar that can be used for your main site navigation

Usage

1
UIkitNavbar(..., transparent = FALSE, mode = NULL)

Arguments

...

Slot for UIkitNavMenu.

transparent

Navbar transparency. FALSE by default.

mode

Way to trigger navbar elements: NULL by default (on hover) but also "click".

Author(s)

David Granjon, dgranjon@ymail.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
if(interactive()){
library(shiny)
shiny::shinyApp(
 ui = UIkitPage(
   title = "My UIkit application",
   navbar = UIkitNavbar(
     UIkitNavMenu(
       sidebarTrigger = TRUE, 
       sidebarId = "mysidebar",
       position = "center",
       UIkitNavItems(
         id = "container",
         #mode = "tabs",
         UIkitNavItem(tabName = "item1"),
         UIkitNavItem(tabName = "item2")
       )
     )
   ),
   UIkitSidebarLayout(
     sidebarPanel = UIkitSidebar(
       id = "mysidebar",
       tagList(
         h3("Test Sidebar"),
         "Lorem ipsum dolor sit amet, consectetur adipiscing 
         elit, sed do eiusmod tempor incididunt ut labore et 
         dolore magna aliqua. Ut enim ad minim veniam, quis 
         nostrud exercitation ullamco laboris nisi ut aliquip 
         ex ea commodo consequat.",
         sliderInput("obs", "Number of observations:",
                     min = 0, max = 1000, value = 500
         ),
         radioButtons(
           "dist", 
           "Distribution type:",
           c("Normal" = "norm",
             "Uniform" = "unif",
             "Log-normal" = "lnorm",
             "Exponential" = "exp"
           )
         )
       )
   ),
   mainPanel = UIkitTabItems(
     id = "container",
     plotOutput("distPlot"),
     plotOutput("plot")
   )
 )
 ),
 server = function(input, output) {
   output$distPlot <- renderPlot({
     hist(rnorm(input$obs))
   })
   output$plot <- renderPlot({
     dist <- switch(
       input$dist,
       norm = rnorm,
       unif = runif,
       lnorm = rlnorm,
       exp = rexp,
       rnorm
     )
     hist(dist(500))
   })
  }
 )
}

DivadNojnarg/shinyUIkit documentation built on July 24, 2019, 8:17 a.m.