Quizzes & Interactivity
One of the most powerful features for learning platforms are interactive quizzes!
How Quizzes Work
Quizzes consist of:
- Questions with multiple options
- Correct answer (0-based index)
- Explanations for the solution (optional)
- Feedback after checking
Users can check their answers and receive instant feedback with explanations.
Example Quiz
Test your knowledge about Knowledge Core:
Knowledge Test: Knowledge Core Basics
1. Which framework is used for the frontend apps?
2. In what format is content written?
3. Which package manager is used?
4. Where are shared components defined?
Using Quizzes in Your Courses
Here’s how to add a quiz:
import { Quiz } from '@knowledge-core/ui';
<Quiz
title="My Quiz"
questions={[
{
question: "Your question?",
options: ["Option 1", "Option 2", "Option 3"],
correctAnswer: 1,
explanation: "Explanation of the correct answer"
}
]}
/>
Exercise
Create your own quiz
Try the following:
- Create a new lesson
- Add a quiz with at least 3 questions
- Test the quiz in the browser
- Experiment with different explanations
Bonus: Combine quizzes with other components like Callouts or Hints!
More Possibilities
Multiple Quizzes per Lesson
You can have multiple quizzes in one lesson:
Bonus Quiz: MDX & Components
1. What is an advantage of MDX over regular Markdown?
Summary
You learned:
- How quizzes are structured
- How to embed quizzes in lessons
- Best practices for good quiz questions
- How quizzes can be combined with other components
Course completed!
Congratulations! You now know the key features of Knowledge Core.
Next steps:
- Create your own course
- Customize the theming
- Read SETUP.md for details
- Check out the Rust course example in
.github/example-content/