A catalog is the finite set of components the model is allowed to render.
Each component compiles to one ellmer::tool(); the built-in lifecycle
tools (update_component, remove_component, clear_canvas) are
registered alongside it by genui_server().
Arguments
- ...
genui_component()objects, or lists of them (so component packs such asgenui_components_bslib()can be passed directly).
Examples
note <- genui_component(
name = "note_card",
description = "A card showing a short note.",
args = list(text = "The note text."),
ui = function(id, args) htmltools::p(args$text)
)
catalog <- genui_catalog(note)
names(catalog)
#> [1] "note_card"