← All widgetsTier 1Games & Random

Quiz

Multiple-choice quiz with scoring.

A multiple-choice quiz with per-question explanations and a final score.

type · quiz
Runs entirely in the shell — no backend needed.

How to use it

Just ask for it in chat — the agent emits this widget and the shell renders it:

Try saying
make a 3-question quiz about the solar system

Example

The agent returns this A2UI component (inside the components array of a /chat response):

quiz.json
{
  "type": "quiz",
  "title": "Solar System",
  "questions": [
    {
      "question": "Largest planet?",
      "options": [
        "Earth",
        "Jupiter",
        "Mars"
      ],
      "correct": 1,
      "explanation": "Jupiter is the largest."
    }
  ]
}

Properties

PropTypeDescription
titlestringQuiz title
questions{question,options,correct,explanation}[]Question set
colorcolorAccent color

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