navbarPage2: navbarPage add custom input

Description Usage Examples

Description

navbarPage add custom input

Usage

1
navbarPage2(..., navbar2 = NULL)

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
## Only run this example in interactive R sessions
if (interactive()) {
  library(shiny)
  library(shinydashboard)
  navbar_search <- tags$ul(
    class = "nav navbar-nav navbar-left",
    tags$li(
      tags$form(
        class = "navbar-form",
        tagList(
          textInput("search", label = NULL))
        ))
  )
  navbar_user <- tags$ul(
    class = "nav navbar-nav navbar-right",
    tags$li(tags$form(class = "navbar-text", "User: Dean")),
    tags$li(
      tags$form(
        class = "navbar-form",
        tagList(
          actionButton(
            style = "background-color:rgba(0,0,0,0); border:0; border-radius:15px;",
            "help", label = NULL, icon = icon("question")),
          actionButton(
            style = "background-color:rgba(0,0,0,0); border:0;border-radius:15px;",
            "signout", label = NULL, icon = icon("sign-out")))
        ))
  )
  shinyApp(
    ui = navbarPage2(
      "Test app",
      tabPanel("tab1", "tab 1"),
      tabPanel("tab2", "tab 2"),
      tabPanel("tab3", "tab 3"),
      navbar2 = tagList(navbar_search, navbar_user)
    ),
    server = function(input, output, session) {
    }
    )
}

jeevanyue/ShinyFuncs documentation built on May 24, 2019, 7:14 a.m.