Diagram
Labelled educational diagram.
An educational diagram with a title, an SVG body, and labelled parts.
type · diagram
A visual explainer the agent uses for 'how does X work' answers.
How to use it
Just ask for it in chat — the agent emits this widget and the shell renders it:
Try saying
“explain the water cycle with a labelled diagram”
Example
The agent returns this A2UI component (inside the components array of a /chat response):
diagram.json
{
"type": "diagram",
"title": "The Water Cycle",
"svg": "<svg>…</svg>",
"labels": [
{
"text": "Evaporation",
"color": "0xFF007AFF"
}
]
}Properties
| Prop | Type | Description |
|---|---|---|
title | string | Diagram title |
svg | string | SVG markup |
labels | {text,color}[] | Labels/legend |
width | number | Width |
height | number | Height |
Browse the full Widget Index, the Widget Catalog, or learn the A2UI system behind it.