Builds application right sidebar with given configurations and elements. It is called within "ui_right_sidebar.R". Check example application for detailed example

add_ui_right_sidebar(
  sidebar_elements = NULL,
  sidebar_menu = NULL,
  collapsed = TRUE,
  overlay = TRUE,
  pinned = FALSE,
  skin = "light"
)

Arguments

sidebar_elements

List of regular shiny UI elements (inputText, textArea, etc..)

sidebar_menu

?bs4Dash::controlbarMenu() object to created a menu inside right sidebar

collapsed

If TRUE, the sidebar will be collapsed on app startup (default = TRUE)

overlay

Whether the sidebar covers the content when expanded (default = TRUE)

pinned

If TRUE, allows right sidebar to remain open even after a click outside (default = FALSE)

skin

Sidebar skin. "dark" or "light" (default = "light")

Value

list of both shiny UI elements and named right sidebar properties

Shiny Usage

Call this function from program/ui_right_sidebar.R to set right sidebar parameters

Examples

  library(shiny)
  library(bs4Dash)

  # Inside ui_right_sidebar.R
  sidebar_elements <- list(div(checkboxInput("checkMe", "Example Check")))
  sidebar_menu     <- controlbarMenu(id = "controlbarmenu",
                                     controlbarItem("Item 2", "Simple text"))
 # -- Register Right Sidebar Elements in the ORDER SHOWN in the UI
  add_ui_right_sidebar(sidebar_elements = sidebar_elements,
                       sidebar_menu     = sidebar_menu)