Learn R Programming

periscope (version 1.0.4)

add_ui_sidebar_right: Add UI Elements to the Right Sidebar

Description

This function registers UI elements at the right dashboard sidebar. The UI elements to be added depend on the version of shinydashboardPlus in use.

Usage

add_ui_sidebar_right(elementlist = NULL, append = FALSE)

Arguments

elementlist

list of UI elements to add to the sidebar tab

append

whether to append the elementlist to the currently registered elements or replace the currently registered elements completely

Shiny Usage

Call this function after creating elements in program/ui_sidebar_right.R to register them to the application framework and show them on the right dashboard sidebar

See Also

add_ui_sidebar_basic

add_ui_body

shinydashboardPlusGallery

Examples

Run this code
if (FALSE) {
require(shiny)
require(shinydashboardPlus)

# shinydashboardPlus changed significantly in version 2.0 and has 
# different syntax for the element content, here is an example for each

# shinydashboardPlus < 2.0
s1 <- rightSidebarTabContent(id = 1, icon = "desktop", title = "Tab 1 - Plots", active = TRUE, 
                             div(helpText(align = "center", "Sample UI Text"),
                                 selectInput("sample1", "A Select", c("A", "B", "C")) ))

# shinydasboardPlus >= 2.0
s1 <- controlbarMenu(id = 1, selected = "Tab 1 - Plots",
                     controlbarItem(icon = icon("desktop"), title = "Tab 1 - Plots",
                                    div(helpText(align = "center", "Sample UI Text"),
                                    selectInput("sample1", "A Select", c("A", "B", "C")) )))
                                    
# add the above content to the sidebar (periscope functionality)
add_ui_sidebar_right(list(s1), append = FALSE)
}

Run the code above in your browser using DataLab