Skip to contents

Place this anywhere in your UI, typically as the main content next to a shinychat::chat_ui() sidebar. Components emitted by the model are inserted into it progressively as tool calls complete. Pair it with a genui_server() call using the same id.

Usage

genui_canvas(id, ..., placeholder = "Components will appear here.")

Arguments

id

Module id, matching the id passed to genui_server().

...

Attributes and initial children added to the canvas <div>.

placeholder

Text shown while the canvas is empty.

Value

An htmltools::tag() object.

Examples

genui_canvas("canvas")
#> <div id="canvas-canvas" class="genui-canvas" data-placeholder="Components will appear here."></div>