Skip to main content
Version: v2.2.0

BaseIndividualComponent

Defined in: parser/types.ts:696

The BaseIndividualComponent interface is used to define the required fields for all components.

All components must include the response field, which is an array of Response interfaces. There are additional optional fields that can be included in a component that help layout the task. These include the nextButtonText, nextButtonLocation, instructionLocation, correctAnswer. There are other fields that can be included in a component that are used to identify the task in the admin panel. These include the meta, description, instruction, and title fields.

Extended by

Properties

PropertyTypeDescriptionDefined in
allowFailedTraining?booleanControls whether the component should allow failed training. If present, will override the allow failed training setting in the uiConfig.parser/types.ts:743
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.parser/types.ts:703
description?stringThe description of the component. This is used to identify and provide additional information for the component in the admin panel.parser/types.ts:707
enumerateQuestions?booleanWhether to prepend questions with their index (+ 1). This should only be used when all questions are in the same location, e.g. all are in the side bar. If present, will override the enumeration of questions setting in the uiConfig.parser/types.ts:749
helpTextPath?stringThe path to the help text file. This is displayed when a participant clicks help. Markdown is supported. If present, will override the help text path set in the uiConfig.parser/types.ts:723
instruction?stringThe instruction of the component. This is used to identify and provide additional information for the component in the admin panel.parser/types.ts:719
instructionLocation?ConfigResponseBlockLocationThe location of the instructions. If present, will override the instruction location setting in the uiConfig.parser/types.ts:721
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.parser/types.ts:705
nextButtonDisableTime?numberThe time in milliseconds to wait before the next button is disabled. If present, will override the next button disable time setting in the uiConfig.parser/types.ts:733
nextButtonEnableTime?numberThe time in milliseconds to wait before the next button is enabled. If present, will override the next button enable time setting in the uiConfig.parser/types.ts:731
nextButtonLocation?ConfigResponseBlockLocationThe location of the next button. If present, will override the next button location setting in the uiConfig.parser/types.ts:729
nextButtonText?stringThe text to display on the next button. If present, will override the next button text setting in the uiConfig.parser/types.ts:727
nextOnEnter?booleanWhether enter key should move to the next question. If present, will override the enter key setting in the uiConfig.parser/types.ts:725
previousButton?booleanWhether to show the previous button. If present, will override the previous button setting in the uiConfig.parser/types.ts:735
previousButtonText?stringThe text that is displayed on the previous button. If present, will override the previous button text setting in the uiConfig.parser/types.ts:737
provideFeedback?booleanControls whether the component should provide feedback to the participant, such as in a training trial. If present, will override the provide feedback setting in the uiConfig.parser/types.ts:739
recordAudio?booleanWhether or not we want to utilize think-aloud features. If present, will override the record audio setting in the uiConfig.parser/types.ts:745
recordScreen?booleanWhether or not we want to utilize screen recording feature. If present, will override the record screen setting in the uiConfig. If true, the uiConfig must have recordScreen set to true or the screen will not be captured. It's also required that the library component, $screen-recording.co.screenRecordingPermission, be included in the study at some point before this component to ensure permissions are granted and screen capture has started.parser/types.ts:747
responseResponse[]The responses to the componentparser/types.ts:699
responseDividers?booleanWhether to show the response dividers. If present, will override the response dividers setting in the uiConfig.parser/types.ts:751
responseOrder?"fixed" | "random"The order of the responses. Defaults to 'fixed'.parser/types.ts:755
showTitle?booleanControls whether the title should be hidden in the study. If present, will override the title setting in the uiConfig.parser/types.ts:715
showTitleBar?booleanControls whether the title bar should be hidden in the study. If present, will override the title bar setting in the uiConfig.parser/types.ts:717
sidebarWidth?numberThe width of the left sidebar. If present, will override the sidebar width setting in the uiConfig.parser/types.ts:713
style?StylesYou can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"}parser/types.ts:759
stylesheetPath?stringThe path to the external stylesheet file.parser/types.ts:757
trainingAttempts?numberThe number of training attempts allowed for the component. If present, will override the training attempts setting in the uiConfig.parser/types.ts:741
windowEventDebounceTime?numberDebounce time in milliseconds for automatically tracked window events. If present, will override the window event debounce time setting in the uiConfig.parser/types.ts:753
withProgressBar?booleanControls whether the progress bar is rendered. If present, will override the progress bar setting in the uiConfig.parser/types.ts:709
withSidebar?booleanControls whether the left sidebar is rendered at all. Required to be true if your response's location is set to sidebar for any question. If present, will override the sidebar setting in the uiConfig.parser/types.ts:711