vladli
vladli

Reputation: 1573

Vertical tabs / navigation in shiny?

Short question: Is it possible How to have a navigation bar on vertical level? For example, change this Shiny's example app in a way that navbar is vertical, on the left side of the screen.

Upvotes: 1

Views: 2673

Answers (3)

heyo
heyo

Reputation: 51

Shiny has navlistPanel(), which you can read more about on the Shiny Application Layout Guide.

Shiny Navlists

ui <- fluidPage(

  titlePanel("Application Title"),

  navlistPanel(
    "Header A",
    tabPanel("Component 1"),
    tabPanel("Component 2"),
    "Header B",
    tabPanel("Component 3"),
    tabPanel("Component 4"),
    "-----",
    tabPanel("Component 5")
  )
)

Upvotes: 2

Shree
Shree

Reputation: 11140

I don't think shiny has vertical navbar. You'll probably have to hack it or you could potentially simulate it using a combination of sidebarLayout and conditionalPanel.

An alternative and easiest way though is to use the shinydashboard package. See image below.

enter image description here

Upvotes: 1

akelopes
akelopes

Reputation: 539

Do you mean like in a Sidebar Layout?

Upvotes: -1

Related Questions