Skip to content

WorkedExample

Generated from front/ui/catalogue/examples/WorkedExample.json

learning · static (no JavaScript) · no children. All components: component playground.

A worked example inside extra help: a title and the steps as Markdown (at most 1 800 characters). Static; it is one of the blocks generated for a learner who struggled with a part of the course, and every block cites its source fragments.

Rendered from the example props below with the real component. Theme: coffee · oncall · nightsky · gravity · poland · ulam · platform · open on its own

{
"component": "WorkedExample",
"props": {
"title": "Working out a brew ratio",
"markdown": "Step 1. Pick the cup size: 300 ml of water.\n\nStep 2. A 1:16 ratio means 1 g of coffee for every 16 g of water, so divide 300 by 16.\n\nStep 3. That gives about 19 g of coffee."
}
}
Prop Type Required Notes
title string yes Heading of the block. max length 120
markdown string yes Markdown, at most 1 800 characters; raw HTML is escaped. max length 1800
id string Anchor id for in-page links (letters, digits, dashes). max length 40

What a text-only client, an unknown renderer or a plain-text channel shows for the example above.

Working out a brew ratio
Step 1. Pick the cup size: 300 ml of water.
Step 2. A 1:16 ratio means 1 g of coffee for every 16 g of water, so divide 300 by 16.
Step 3. That gives about 19 g of coffee.

A node whose props fail the schema never breaks the page: the renderer shows the plain-text fallback instead (and logs the issues in development).

{
"title": "No steps yet"
}

Issues:

  • /markdown is required

Rendered as:

No steps yet

axe-core: 12 rules passed, 0 violations, 0 need manual review. Run at build time on the server-rendered HTML in jsdom. Colour contrast and layout rules need a browser and are covered by the Playwright axe scans of the reference frontend.