SupportCard
Generated from front/ui/catalogue/examples/SupportCard.json
learning · interactive (ships a small web component) · renders children. All components: component playground.
Description for the model
Section titled “Description for the model”The ‘Extra help for you’ card on a lesson page: a labelled region with a short summary, the generated blocks as children, the reasons it is shown, and ‘This helped’ / ‘Not helpful’ / ‘Hide’ controls. Status changes are announced politely. Filled by the app from the learner’s own support items; authors and models do not place it.
Live example
Section titled “Live example”Rendered from the example props below with the real component. Theme: coffee · oncall · nightsky · gravity · poland · ulam · platform · open on its own
Example
Section titled “Example”{ "component": "SupportCard", "props": { "assignmentId": "01JBCDEFGHJKMNPQRSTVWXYZ01", "status": "ready", "summary": "A short explanation of the brew ratio and one question to try.", "reasons": [ "You answered this question wrongly 2 times" ], "aiLabel": "AI-generated, based on this course's sources" }}| Prop | Type | Required | Notes |
|---|---|---|---|
assignmentId |
string | Id of the learner’s assignment (26-character ULID); without it the controls are not shown. max length 26 | |
status |
"generating" | "ready" | "failed" |
generating = still being prepared; ready = the blocks are the children; failed = nothing to show. default "ready" |
|
summary |
string | One or two sentences on what the help covers. max length 300 | |
reasons |
array of string | Why this help is shown. max 6 items | |
aiLabel |
string | The AI label shown in the heading row. max length 120 | |
feedback |
"helpful" | "not_helpful" |
The learner’s earlier answer, if any | |
position |
integer | Number of this card when the lesson has several (1, 2, …), so each region has its own name. ≥ 1, ≤ 20 | |
total |
integer | How many cards the lesson has. ≥ 1, ≤ 20 | |
locale |
"en" | "pl" | "zh" |
Interface language of the fixed strings; filled by the app, authors and models leave it out | |
id |
string | Anchor id for in-page links (letters, digits, dashes). max length 40 |
Text fallback
Section titled “Text fallback”What a text-only client, an unknown renderer or a plain-text channel shows for the example above.
A short explanation of the brew ratio and one question to try.- You answered this question wrongly 2 timesInvalid props
Section titled “Invalid props”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).
{ "status": "done"}Issues:
/statusmust be one of “generating”, “ready”, “failed”
Rendered as:
Nothing: this component has no text of its own.
Accessibility
Section titled “Accessibility”axe-core: 20 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.