ToonUI
Concepts

Mental Model

The conceptual model behind ToonUI: server teaches, model describes, client renders, app decides.

ToonUI is a contract between your model and your app.

server teaches -> model describes -> client renders -> app decides

It is not an alternative to JSON renderers like json-render.dev. ToonUI does not try to turn arbitrary JSON into a screen. It teaches the model a small semantic language, validates that language against your active catalog, and lets your app render known components.

Ownership

LayerOwner
Active catalog and prompt@toon-ui/core
Model response generationyour AI SDK/model provider
React rendering@toon-ui/react
Business behavioryour app

Important rule

The model does not create new components.

It can only emit standard ToonUI components enabled in the active catalog.

createToonProtocol({
  components: ['text', 'card', 'button'],
});

That prompt will not teach form, table, or chart unless you enable them.

Interactions are intent, not execution

A button like this:

button primary "Delete" reply="delete product 123"

is not a deletion.

It is user intent. Your app decides whether to call a tool, ask for confirmation, check permissions, or ignore it.

On this page