Skip to main content
These blocks respond to the reader: answering a question, tuning an assumption, or running code. All of them run in the reader’s browser. Nothing a reader does changes the page file.

Quiz callouts

A quiz is a callout tagged [!quiz]. The question goes on the tag line, options or the answer go in the body, and an explanation after a blank > line appears once the reader checks an answer.
The tag line is [!quiz <kind> shuffle ^<id>], each part optional:
  • Kind selects the question type. If you leave it out, one [x] makes a single-choice question, several make a multi-select, items that all contain :: make a match, and plain items make an ordering question.
  • shuffle randomizes choice order. Order and match questions always shuffle.
  • ^id gives the quiz a stable id, so a reader’s saved attempts survive edits to the question.
An indented line under an option is feedback for that option.
Mark correct options with [x]. Two or more [x] marks make it a multi-select automatically.
Write the answer (true, false, yes, or no) on its own line. Also spelled tf or truefalse.
List items in the correct order. The reader sees them shuffled. Needs at least two items.
Write each correct pair as left :: right. Needs at least two pairs.
Write the accepted answers on one line, separated by |. Matching ignores case, extra whitespace, and trailing punctuation.
Answer keys stay in the page file, but search indexes only the question, so search results and snippets never reveal an answer. Each reader’s attempts are saved to their own per-reader state. Agents can call the kiwi_quiz MCP tool to format a quiz callout from structured fields (kind, prompt, options, items, pairs, answer, accept, explanation), or to check the quizzes in a page (path or content) for authoring problems without revealing the answers.

kiwi-calc

Back-of-envelope math that stays in the page. Assumptions go above ---, derivations below it. Click Tune in the web UI to get a slider per assumption and watch the derivations recompute.
Each line is name: expression, and # starts a comment shown beside the row. Expressions understand magnitude words (thousand, k, million, billion), data sizes (KB through PB, in powers of 1024), and time units (ms, s, min, hour, day, week, month, year). Unknown words such as user are treated as annotations. Agents read the same numbers from the file without the UI.

kiwi-playground

Interactive controls for documenting a configurable parameter set. Readers adjust the values and copy them out as JSON, YAML, or a filled-in prompt.

kiwi-app

Runs HTML, CSS, and JavaScript in a sandboxed iframe. The frame resizes to fit its content and picks up the web UI’s theme colors as CSS custom properties. Set a fixed height on the opening line with height=.
The iframe runs with sandbox="allow-scripts": scripts run, but the app can’t read the parent page or its cookies, submit forms, open popups, or navigate the page. Treat a kiwi-app block like any script you paste into a page.

Live React blocks

A ```widget:live block is React Live code that runs in the browser, with React hooks and every widget view component in scope (ArrayView, MatrixView, TreeView, GraphView, PlotView, TableView, PlaybackControls, usePlayback, and more). End the block by calling render() with the element to show.
Use it as an escape hatch for something a typed fence can’t express. A typed fence is validated, searchable, and readable as text, and a widget:live block is none of those. kiwifs widgets suggest finds widget:live blocks that only draw a static view, and prints the typed fence each one could become. widget:<name> with any typed fence name, such as widget:array, is the strict spelling of that fence, not a live block. See fence names.

Runnable code

A ```widget:code block shows runnable code with an editable listing, a Run button, and output below. Python runs in the browser through Pyodide, which loads on the first run. Set the language on the opening line: lang=python (the default), py, javascript, or js.

Widgets overview

Fence names, steps, playback, and validation.

Data and queries

widget:tracker for per-reader progress through a curriculum.

MCP

kiwi_quiz, kiwi_widget_reference, and kiwi_lint.

Page structure

Callouts, tabs, columns, and figures.
Last modified on October 19, 2026