← Element library

Matching and ordering

Match List

Drag answers to match each prompt.

Delivery

Respond, review and evaluate

Authoring

No authoring view in this package

Print

No print view in this package

The prompt "Match each year to the corresponding historical event. Drag and drop the events." with the years 1754, 1773, 1775, 1776 and 1787 each beside an empty drop zone, and five event tiles below, including Boston Tea Party and Declaration of Independence.
Match List example

Try the interaction

Live example: @pie-element/match-list@8.0.4 · players 1.0.0-beta.5.

Open all examples for this element →

Use it in an item

Map the tag to an exact package version and match the model ID to the markup. The item player loads the views. You can use any frontend framework.

{
  "elements": {
    "match-list": "@pie-element/match-list@8.0.4"
  },
  "markup": "<match-list id=\"example\"></match-list>",
  "models": [
    {
      "id": "example",
      "element": "match-list",
      "lockChoiceOrder": true,
      "answers": [
        {
          "id": 2,
          "title": "Battle of Lexington and Concord"
        },
        {
          "id": 3,
          "title": "Declaration of Independence"
        },
        {
          "id": 1,
          "title": "Boston Tea Party"
        },
        {
          "id": 0,
          "title": "French and Indian War"
        },
        {
          "id": 4,
          "title": "Constitutional Convention"
        }
      ],
      "prompt": "<p>Match each year to the corresponding historical event. Drag and drop the events.</p>",
      "prompts": [
        {
          "id": 1,
          "title": "1754",
          "relatedAnswer": 0
        },
        {
          "id": 2,
          "title": "1773",
          "relatedAnswer": 1
        },
        {
          "id": 3,
          "title": "1775",
          "relatedAnswer": 2
        },
        {
          "id": 4,
          "title": "1776",
          "relatedAnswer": 3
        },
        {
          "id": 5,
          "title": "1787",
          "relatedAnswer": 4
        }
      ]
    }
  ]
}

Embed an item · Embed authoring · Print integration

Responses and scoring

The controller defines scoring for this element. Browser scoring returns one outcome per element. Your application combines those outcomes into an item score and handles trusted server scoring.

Scoring, partial credit and rubrics →

Model, configuration and session reference

The model holds content, configuration controls the editor, and the session holds the response. Fields below come from generated JSON Schemas.

Schema version: @pie-element/match-list@8.0.6. Example version: 8.0.4. Use the schema matching your content. Schema checks cover data structure; controller validation checks authoring rules.

model fields (13)
FieldTypeMeaningDefault / values
idRequiredstringIdentifier to identify the Pie Element in html markup, Must be unique within a pie item config.—
elementRequiredstringThe html Element tag name: the key in the item config's `elements` map, e.g. "multiple-choice"—
accessibilityCatalogsarrayQTI-aligned accessibility catalogs whose cards dock to content nodes by `data-catalog-idref`—
promptstringThe question prompt or item stem—
promptsarrayThe question prompts that are going to be displayed. The default model carries none.—
answersarrayThe answer rows that are going to be displayed. The default model carries none.—
lockChoiceOrderbooleanIndicates if answers should be locked in order according to the model or if they should be shuffed true - order is respected according to model false - order is shuffled—
duplicatesbooleanIndicates if duplicates are allowed—
partialScoringbooleanIndicates if partial scoring should be used. Scoring treats an absent value as enabled.—
feedbackMatchListFeedbackFeedback shown in evaluate mode—
rationalestringIndicates rationale for correct answer; shown to instructors in view and evaluate mode—
languagestringIndicates the language of the component Supported options: en, es, en_US, en-US, es_ES, es-ES, es_MX, es-MX—
configobjectNot read by this element: the controller defaults nest their values under this key, so the default model carries it, and the controller reads `prompts`, `answers` and `prompt` from the root—

Named object types

AccessibilityCatalog
FieldTypeMeaningDefault / values
identifierRequiredstringSee the named type or the example model.—
cardsRequiredarraySee the named type or the example model.—
CatalogCard
FieldTypeMeaningDefault / values
catalogRequiredstringSee the named type or the example model.—
languagestringSee the named type or the example model.—
contentstringSee the named type or the example model.—
payloadCatalogCardPayloadSee the named type or the example model.—
SignLanguageCardPayload
FieldTypeMeaningDefault / values
signLangstringLanguage tag for the signed translation — BCP 47, which admits ISO 639-3 subtags for languages with no 639-1/2 code. "ase" is ASL, matching QTI 3 `xml:lang`. This is the language of the *adaptation*, not the item's base content language (AfA/PNP's `languageOfAdaptation`). The distinction is load bearing: a Spanish item's signed alternate is LSM, not ASL, so `signLang` must never be inferred from the item or assessment content language. Optional, and redundant on almost every card. The card's `language` states the same code and is the only field pie-players resolves a card on — resolution runs before anything knows the card is a signing card, so it can only key on the generic field — and the player falls back to it when this is absent. Author it only where the two differ: a card tagged with the item's content language (`language: 'en-US'`, `signLang: 'ase'`) so resolution reaches it by the default-language rung. The pie-api-aws importer emits `language` alone.—
mediaRequiredMediaAssetRefSee the named type or the example model.—
fragmentMediaFragmentRangeSee the named type or the example model.—
MediaAssetRef
FieldTypeMeaningDefault / values
versionRequirednumberSee the named type or the example model.—
idRequiredstringSee the named type or the example model.—
kindRequiredMediaKindSee the named type or the example model.—
sourcesRequiredarraySee the named type or the example model.—
posterstringSee the named type or the example model.—
thumbnailstringSee the named type or the example model.—
durationSecondsnumberSee the named type or the example model.—
tracksarraySee the named type or the example model.—
transcriptTranscriptRefSee the named type or the example model.—
labelstringSee the named type or the example model.—
descriptionstringSee the named type or the example model.—
langstringLanguage of the asset itself, as authored metadata. Sign-language cards leave it unset: the card's `language` already states the adaptation language, and a second copy is a second thing to keep in agreement.—
MediaSource
FieldTypeMeaningDefault / values
srcRequiredstringSee the named type or the example model.—
typestringMIME type, e.g. "video/mp4".—
widthnumberSee the named type or the example model.—
heightnumberSee the named type or the example model.—
bitratenumberSee the named type or the example model.—
TextTrackRef
FieldTypeMeaningDefault / values
srcRequiredstringSee the named type or the example model.—
kindRequiredstringSee the named type or the example model.—["captions","subtitles","descriptions","chapters","metadata"]
langRequiredstringSee the named type or the example model.—
labelRequiredstringSee the named type or the example model.—
defaultbooleanSee the named type or the example model.—
TranscriptRef
FieldTypeMeaningDefault / values
srcstringSee the named type or the example model.—
htmlstringSee the named type or the example model.—
plainTextstringSee the named type or the example model.—
langstringSee the named type or the example model.—
MediaFragmentRange
FieldTypeMeaningDefault / values
startSecondsRequirednumberSee the named type or the example model.—
endSecondsnumberSee the named type or the example model.—
SpokenAudioCardPayload
FieldTypeMeaningDefault / values
mediaRequiredMediaAssetRefSee the named type or the example model.—
fragmentMediaFragmentRangeSee the named type or the example model.—
MatchListPrompt
FieldTypeMeaningDefault / values
idRequiredstring | numberIdentifier for a question prompt—
titleRequiredstringText that will be displayed in the question prompt row—
relatedAnswerRequiredstring | numberId for the correct answer for this question prompt—
MatchListAnswer
FieldTypeMeaningDefault / values
idRequiredstring | numberIdentifier for an answer row; the response counts as complete only when every placed id is a number—
titleRequiredstringText that will be displayed in the answer row—
MatchListFeedback
FieldTypeMeaningDefault / values
correctMatchListFeedbackTypeIndicates the configuration for feedback when answer is correct—
incorrectMatchListFeedbackTypeIndicates the configuration for feedback when answer is incorrect—
partialMatchListFeedbackTypeIndicates the configuration for feedback when answer is partially correct—
unansweredMatchListFeedbackTypeIndicates the configuration for feedback when there is no answer—
MatchListFeedbackType
FieldTypeMeaningDefault / values
typeRequiredstringIndicates the feedback type—["default","none","custom"]
defaultstringIndicates the feedback value—
customstringIndicates the feedback custom value—
Open the complete JSON Schema
session fields (4)
FieldTypeMeaningDefault / values
idstringIdentifier of the session—
elementstringThe element the session belongs to—
valueobjectThe answer placed in each response area: the answer's `id`, keyed by the prompt's `id`—
shuffledValuesobjectPrompt and answer ids in the order they were shuffled for this learner, when choice order is not locked—
Open the complete JSON Schema

How to use the schemas →

Accessibility and content requirements

PIE targets WCAG 2.2 AA. Provide clear prompts and media alternatives, and test the question with a keyboard and assistive technology. Manual testing is still incomplete; see the coverage notes below.

Accessibility and evidence · Element evidence and manual checks(opens in new tab)

Element package source(opens in new tab) · Example source(opens in new tab) · Snapshot cb30a68f