Skip to contents

A themed variant of ptr_app() that lays out the generated controls and outputs inside a bslib::page_sidebar() shell with bslib::card() containers. Intended as a worked example of how to reskin ggpaintr using only its public API: the wrapper calls ptr_build_ids(), ptr_input_ui(), and ptr_server() and composes outputs from the id contract with plain shiny primitives — no internal helpers are touched.

Usage

ptr_app_bslib(
  formula,
  envir = parent.frame(),
  ui_text = NULL,
  placeholders = NULL,
  expr_check = TRUE,
  theme = NULL,
  title = "ggpaintr"
)

Arguments

formula

A single formula string using ggpaintr placeholders.

envir

Environment used to resolve local data objects when building the app.

ui_text

Optional named list of copy overrides for UI labels, helper text, and placeholders.

placeholders

Optional custom placeholder definitions or an existing placeholder registry.

expr_check

Controls expr placeholder validation. See ptr_app().

theme

A bslib theme object. Defaults to a Bootstrap 5 Flatly bootswatch. Pass any bslib::bs_theme() result to customize.

title

App title shown in the page header.

Value

A shiny.appobj.

Details

Requires the bslib package. Install it with install.packages("bslib").

Examples

if (FALSE) { # \dontrun{
ptr_app_bslib(
  "ggplot(data = mtcars, aes(x = var, y = var)) + geom_point()"
)
} # }