Quiz
Inline knowledge checks with instant feedback or scored mode for tutorials and courses.
For isolated previews, theme switching, and sandbox editing, open the Quiz playground on holydocs.com .
When to use
Use this component when the reader benefits from an active surface such as a form, quiz, chart, or draggable visual.
Live Examples
Every example below renders the real component directly inside HolyDocs, followed by the exact MDX you can paste into a page.
Instant Feedback
Single question with immediate feedback.
What protocol does HolyDocs use for webhooks?
Webhooks are HTTP POST requests sent to your configured URL when events occur.
mdx<Quiz> <Question text="What protocol does HolyDocs use for webhooks?"> <Option>REST polling</Option> <Option correct>HTTP POST callbacks</Option> <Option>WebSocket</Option> <Explanation>Webhooks are HTTP POST requests sent to your configured URL when events occur.</Explanation> </Question></Quiz>
Scored Quiz
Multi-question quiz with score.
Which database does HolyDocs use?
HolyDocs uses Cloudflare D1, a serverless SQLite database.
Where are assets stored?
R2 is Cloudflare's S3-compatible object storage.
mdx<Quiz mode="scored"> <Question text="Which database does HolyDocs use?"> <Option correct>D1 (SQLite)</Option> <Option>PostgreSQL</Option> <Option>MongoDB</Option> <Explanation>HolyDocs uses Cloudflare D1, a serverless SQLite database.</Explanation> </Question> <Question text="Where are assets stored?"> <Option>S3</Option> <Option correct>R2</Option> <Option>Local disk</Option> <Explanation>R2 is Cloudflare's S3-compatible object storage.</Explanation> </Question></Quiz>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
mode | string | 'instant' | Feedback mode: instant or scored. |
Usage
Start from this baseline shape and then tailor the copy, data, or nesting to the page you are writing.
mdx<Quiz> <Question text="What protocol does HolyDocs use for webhooks?"> <Option>REST polling</Option> <Option correct>HTTP POST callbacks</Option> <Option>WebSocket</Option> <Explanation>Webhooks are HTTP POST requests sent to your configured URL when events occur.</Explanation> </Question></Quiz>
Tips
- Explain what changes when a reader interacts with the component. Motion or controls alone should not carry the full meaning.
- Keep a non-interactive fallback in mind for screenshots, exported docs, and AI-driven readers that only see the resulting HTML.
- Verify keyboard behavior and focus states whenever the component includes inputs, toggles, or draggable controls.
Related Components
More
- Interactive playground: Quiz on holydocs.com
- Component library index: /components