Skip to main content
Version: v2.2.0

TextOnlyResponse

Defined in: parser/types.ts:631

The TextOnlyResponse interface is used to define the properties of a text only response. TextOnlyResponses render as a block of text that is displayed to the user. This can be used to display instructions or other information. It does not accept any input from the user.

Example:

{
"id": "textOnlyResponse",
"type": "textOnly",
"prompt": "This is a text only response, it accepts markdown so you can **bold** or _italicize_ text.",
"location": "belowStimulus",
"restartEnumeration": true
}

In this example, the text only response is displayed below the stimulus and the enumeration of the questions is restarted.

Extends

  • Omit<BaseResponse, "secondaryText" | "required" | "requiredValue" | "requiredLabel" | "paramCapture" | "hidden" | "withDontKnow">

Properties

PropertyTypeDescriptionOverridesInherited fromDefined in
hidden?undefined---parser/types.ts:643
idstringThe id of the response. This is used to identify the response in the data file.-BaseResponse.idparser/types.ts:244
location?ConfigResponseBlockLocationControls the response location. These might be the same for all responses, or differ across responses. Defaults to belowStimulus-BaseResponse.locationparser/types.ts:252
paramCapture?undefined---parser/types.ts:642
promptstringThe markdown text that is displayed to the user.BaseResponse.prompt-parser/types.ts:634
required?undefined---parser/types.ts:639
requiredLabel?undefined---parser/types.ts:641
requiredValue?undefined---parser/types.ts:640
restartEnumeration?booleanWhether to restart the enumeration of the questions. Defaults to false.--parser/types.ts:636
secondaryText?undefined---parser/types.ts:638
style?StylesYou can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}-BaseResponse.styleparser/types.ts:268
stylesheetPath?stringThe path to the external stylesheet file.-BaseResponse.stylesheetPathparser/types.ts:266
type"textOnly"---parser/types.ts:632
withDivider?booleanRenders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig.-BaseResponse.withDividerparser/types.ts:262
withDontKnow?undefined---parser/types.ts:644