Skip to main content

Quiz

A <Quiz> component represents a quiz or survey. It supports multiple question types (e.g. radio, dropdown, text input) and renders progress, navigation, and optional informational popovers.

Example

Lorem ipsum odor amet consectetuer adipiscing elit.

Nibh torquent senectus blandit auctor nascetur class vivamus augue consectetur metus!

Props

Use theicon above to preview

Quiz Props

PropsDescriptionValues
headerThe introductory text displayed at the top of the quiz before it startsString
headerPositionPosition of header text and CTA button
  • start
  • center
  • end
questionPositionPosition of the quiz question text
  • start
  • center
  • end
hideStepHeaderBoolean to hide or show the step header (which includes the progress bar and back button) from the quiz layout
  • true
  • false
ctaThe button to start the quiz
  • label
  • variant
questionsThe questions for the quizArray of quiz questions
bottomContentOptional content below the headerArray of content blocks

Quiz Question Props

PropsDescriptionValues
idA unique identifier for the questionString
typeThe question type
  • radio
  • dropdown
  • input
questionThe question textString
informationText content for the information icon popup (optional)String
answerOptionsThe list of possible answers for the questionArray of answer option objects
questionBottomContentOptional content below the questionArray of content blocks

Answer Options Props

PropsDescriptionValues
idA unique identifier for the answer optionString
imageAn optional image asset associated with the answer optionMedia object or URL
optionTextThe answer option textString

Customization

The approach for customization will vary depending on if the customization is intended to be global for all consumers of the UI component or if it is only an override for a particular instance.

  • If the customization is necessary for all use cases, update the component source code in the UI library package directly, otherwise, pass className overrides.