appendVerticalTab: Mutate Vertical Tabset Panel

Description Usage Arguments Examples

View source: R/vertical-tab.R

Description

Mutate Vertical Tabset Panel

Usage

1
2
3
4
5
6
7
8
9
appendVerticalTab(inputId, tab, session = shiny::getDefaultReactiveDomain())

removeVerticalTab(inputId, index, session = shiny::getDefaultReactiveDomain())

reorderVerticalTabs(
  inputId,
  newOrder,
  session = shiny::getDefaultReactiveDomain()
)

Arguments

inputId

The id of the verticalTabsetPanel object.

tab

The verticalTab to append.

session

The session object passed to function given to shinyServer.

index

The index of the the tab to remove.

newOrder

The new index order.

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
if (interactive()) {

library(shiny)
library(shinyWidgets)

ui <- fluidPage(

  verticalTabsetPanel(
    verticalTabPanel("blaa","foo"),
    verticalTabPanel("yarp","bar"),
    id="hippi"
  )
)

server <- function(input, output, session) {
  appendVerticalTab("hippi", verticalTabPanel("bipi","long"))
  removeVerticalTab("hippi", 1)
  appendVerticalTab("hippi", verticalTabPanel("howdy","fair"))
  reorderVerticalTabs("hippi", c(3,2,1))
}

# Run the application
shinyApp(ui = ui, server = server)

}

shinyWidgets documentation built on Sept. 17, 2021, 5:06 p.m.