Renders the full multi-panel Figure Builder interface (sidebar controls
plus the free-form A4 canvas) as a namespaced Shiny module. Place this in the
UI where you want the builder to appear, using an id that matches the one
passed to figureBuilderServer().
Arguments
- id
The ID for the Shiny module. Must match the
idgiven tofigureBuilderServer().- title
A character string used as the header shown above the builder (default:
"VizModules Figure Builder"). PassNULLto omit the header, which is useful when the host page supplies its own title.
Details
Unlike figureBuilderApp() (which returns a complete, standalone app), this
function returns a tagList you can drop into any page, so the builder can be
embedded alongside other content and instantiated more than once (each
instance keeps its own namespace, canvas, and downloads). The module gallery,
moduleGalleryApp(), embeds it this way as its Figure Builder tab.
The returned UI bundles the JavaScript and CSS the canvas needs, and calls
shinyjs::useShinyjs(), so no extra setup is required in the host app.
Examples
if (FALSE) { # interactive()
library(VizModules)
figureBuilderUI("figure_builder")
}