Markdown
Use Markdown to format question text in the default quiz interface. See a typed question example, learn which fields remain plain text, and understand what your own renderer needs to handle when using the headless API.
Question text
The default UI supports Markdown in question: it converts the question string to HTML with Snarkdown, then sanitizes that HTML with sanitize-html. The same sanitizer runs on the server and in the browser, including when disableSynopsis is enabled. Unsafe URL schemes, scripts, and event handlers are removed. explanation, text answers, answer messages, titles, and synopsis are rendered as plain text. Headless state exposes the source strings; your renderer decides how to present them.
import type { Question } from 'react-quiz-component';
const question: Question = {
question: 'Which hook stores **local state**?',
questionType: 'text',
answerSelectionType: 'single',
answers: ['useState', 'useEffect'],
correctAnswer: '1',
explanation: 'useState returns a value and a setter.',
};Audio questions
Add MP3 or other browser-supported audio to quiz questions, with native playback controls, an accessible label, and a transcript.
Locale
Adapt the default quiz labels to your audience with partial locale overrides and dynamic placeholders. Customize question feedback separately, and learn which built-in dialogs require a headless interface if you need translated text.