← All widgetsEducationalEducational

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

PropTypeDescription
titlestringDiagram title
svgstringSVG markup
labels{text,color}[]Labels/legend
widthnumberWidth
heightnumberHeight

Browse the full Widget Index, the Widget Catalog, or learn the A2UI system behind it.