bscuiProxy: Manipulate an existing bscui instance in a 'shiny' app

View source: R/bscui.R

bscuiProxyR Documentation

Manipulate an existing bscui instance in a 'shiny' app

Description

Manipulate an existing bscui instance in a 'shiny' app

Usage

bscuiProxy(shinyId, session = shiny::getDefaultReactiveDomain())

Arguments

shinyId

single-element character vector indicating the 'shiny' output ID of the UI to modify

session

the 'shiny' session object to which the UI belongs; usually the default value will suffice

Details

This function creates a proxy object that can be used to manipulate an existing bscui instance in a 'shiny' app using different methods:

  • update_bscui_ui_elements: change type and title of elements

  • update_bscui_styles: set style of UI elements

  • update_bscui_attributes set attributes of a UI element

  • update_bscui_selection: chose selected elements

  • click_bscui_element: trigger a single or double click on a UI element

  • order_bscui_elements: change elements order (e.g. move them forward)

  • add_bscui_element: add an SVG element to the UI

  • remove_bscui_elements: remove SVG elements from the UI

  • get_bscui_svg: get the displayed SVG in R session

Value

A bscui_Proxy object with an "id" and a "session" slot.

See Also

bscui-shiny

Examples

if(interactive()){
   from_shiny <- new.env()
   shiny::runApp(system.file(
      "examples", "shiny-anatomogram", package = "bscui"
   ))
   for(n in names(from_shiny)){
      bscui(from_shiny[[n]]) |> print()
   }
}

bscui documentation built on June 8, 2025, 11:01 a.m.