lmscn — Component Reference
A collection of plug-and-play React learning components built on shadcn/ui and Tailwind CSS v4. Drop any component into your Next.js project and wire up an onComplete callback to integrate with your LMS backend.
Table of Contents
Quick Start
Install the shadcn/ui primitives and the lmscn components you need:
See the for per-component installation and Tailwind v4 configuration details.
Components
Quiz
A multi-question quiz supporting single-choice, multiple-choice, and true/false question types. Shows per-option explanations after answering, tracks score against a configurable passing threshold, and renders a results screen on completion.
Props — QuizProps
QuizData
QuizQuestion
QuizOption
QuizResult
Flashcards
A flippable flashcard deck with optional spaced-repetition-style self-rating (Again / Hard / Good / Easy). Supports card tags, images on either face, shuffling, and shows a summary breakdown on completion.
Props — FlashcardsProps
FlashcardsData
Flashcard
FlashcardsResult
FlashcardDifficulty is "again" | "hard" | "good" | "easy".
Match
A two-column matching exercise. The learner clicks a term on the left, then its definition on the right. Correct pairs lock with a green highlight; incorrect pairs briefly flash red. Tracks mistakes and elapsed time.
Props — MatchProps
MatchData
MatchPair
MatchResult
Fill in the Blank
Sentence-based cloze exercises. Blanks are marked with ___ in the sentence string and rendered as inline text inputs. Supports multiple blanks per sentence, accepted alternatives, and shows corrections on wrong answers.
Props — FillBlankProps
FillBlankData
FillBlankQuestion
FillBlankResult
Scramble
Letter-unscrambling activity. A pool of shuffled letter tiles is presented; the learner taps tiles to build the answer. Supports image and text clues. Tiles can be reset and re-ordered.
Props — ScrambleProps
ScrambleData
ScrambleQuestion
ScrambleResult
Order
Drag-and-drop (or keyboard ↑↓) sequencing activity. Items are shuffled and the learner arranges them into the correct order. Shows the correct sequence after an incorrect submission.
Props — OrderProps
OrderData
OrderQuestion
OrderItem
OrderResult
Reading Passage
A three-phase reading comprehension component: the learner first reads the passage, then answers comprehension questions (with the passage optionally visible alongside), and finally sees a results summary. Supports plain text and HTML content.
Props — ReadingPassageProps
ReadingPassageData
ReadingQuestion
ReadingResult
Progress Tracker
A visual Duolingo-style learning path. Renders a zigzag sequence of lesson nodes with status indicators (completed, current, available, locked), XP progress, level, and streak. Hovering a node shows a tooltip with score and XP details.
Props — ProgressTrackerProps
ProgressTrackerData
LessonNode
LessonType options: "quiz" | "flashcards" | "match" | "reading" | "video" | "exercise" | "scramble" | "order" | "hotspot" | "spaced-repetition".
Spaced Repetition
An SM-2 spaced-repetition review session. Cards flip on click; after revealing the answer the learner self-grades on a 4-point scale (Again / Hard / Good / Easy). The component computes the next review interval and ease factor and returns them in onComplete.
Props — SpacedRepetitionProps
SpacedRepetitionData
ReviewCard
SpacedRepetitionResult
ReviewGrade is 0 | 1 | 2 | 3 | 4 | 5 (SM-2 quality scale). Grades below 3 reset the interval.
Hotspot
Image-labelling activity. Hotspot markers are overlaid on an image at percentage-based coordinates; the learner clicks each marker and types the correct label into a popover input. Supports optional descriptions revealed after checking.
Props — HotspotProps
HotspotData
HotspotQuestion
HotspotPoint
HotspotResult
TypeScript Types Reference
All types are exported from their respective component files.