Skip to main content
Version: v1.0.0

MarkdownComponent

The MarkdownComponent interface is used to define the properties of a markdown component. The components can be used to render many different things, such as consent forms, instructions, and debriefs. Additionally, you can use the markdown component to render images, videos, and other media, with supporting text. Markdown components can have responses (e.g. in a consent form), or no responses (e.g. in a help text file). Here's an example with no responses for a simple help text file:

{
"type": "markdown",
"path": "<study-name>/assets/help.md",
"response": []
}

Extends

Properties

PropertyTypeDescriptionInherited from
correctAnswer?Answer[]The correct answer to the component. This is used for training trials where the user is shown the correct answer after a guess.BaseIndividualComponent.correctAnswer
description?stringThe description of the component. This is used to identify and provide additional information for the component in the admin panel.BaseIndividualComponent.description
instruction?stringThe instruction of the component. This is used to identify and provide additional information for the component in the admin panel.BaseIndividualComponent.instruction
instructionLocation?"sidebar" | "aboveStimulus" | "belowStimulus"The location of the instructions.BaseIndividualComponent.instructionLocation
meta?Record<string, unknown>The meta data for the component. This is used to identify and provide additional information for the component in the admin panel.BaseIndividualComponent.meta
nextButtonLocation?"sidebar" | "aboveStimulus" | "belowStimulus"The location of the next button.BaseIndividualComponent.nextButtonLocation
nextButtonText?stringThe text that is displayed on the next button.BaseIndividualComponent.nextButtonText
pathstringThe path to the markdown file. This should be a relative path from the public folder.-
provideFeedback?booleanControls whether the component should provide feedback to the participant, such as in a training trial. If not provided, the default is false.BaseIndividualComponent.provideFeedback
responseResponse[]The responses to the componentBaseIndividualComponent.response
type"markdown"--