Generative renderer
Render a UI an assistant described as JSON through a registry you control: no HTML or scripts, unknown parts replaced by a marked placeholder while the rest renders, the spec and its problems one click away, and only allowed actions sent.
Answer from Halden Assistant
October refunds
| Customer | Reason | Amount |
|---|---|---|
| Northwind | Duplicate charge | 144 |
| Lumen Labs | Downgrade | 96 |
| Quayside | Service outage | 72 |
When to use
- Assistants that answer with tables, metrics or actions instead of prose.
- Agent output that needs to be safe to render.
When not to use
- Fixed screens you design yourself; build them directly.
Installation
pnpm dlx shadcn@latest add @caliper/generative-renderer
Adds its 6 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
validateUiSpec
0 props
No props of its own; it re-exports a primitive and takes that primitive’s props.
GenerativeRenderer
6 props
defaultUiRegistry
helper
A helper exported alongside the component, not a component.
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It exposes region and alert semantics, with aria-label, aria-hidden, aria-labelledby and aria-pressed kept in step with state. Changes that matter are announced through a live region.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/generative-renderer.mdThe index of every part is at /llms.txt.