Skip to content

Gradebook

Students by assignments in one grid that works like a spreadsheet, with sticky headers, averages and CSV export.

On this page
Used for
  • Entering and checking scores for a class
  • End of term averages
  • Exporting grades for a school system

Examples

Installation

Installation is part of Pro

Pro components install from a licensed registry. The live preview stays open to everyone.

Props

students
ClassStudent[]
The rows, in the order shown.
assignments
Assignment[]
The columns: id, title, max marks, and optionally topic and date.
book
ScoreBook
Points per student per assignment. Missing or null is not graded.
onScoreChange
(studentId, assignmentId, value | null) => void
Fired when a cell is committed or cleared. Update `book` from it.
onExport
(csv, filename) => void
Defaultdownload
Fired by Export CSV. Leave it out to download the file.
readOnly
boolean
Defaultfalse
Keyboard movement only, no editing.
visibleRows
number
Default10
Rows in view before the grid scrolls. The box is cut at a whole row.
heat
boolean
Defaultfalse
Tint each score with the accent, up to about 18%. Off: plain cells.
passMark
number
Default50
A score under this percent is written in the error colour and read as below the pass mark.

What it handles

  1. 01Works like a spreadsheet: arrows, Home, End, Page Up and Page Down move; Enter, F2 or typing edits; Esc cancels; Delete clears.
  2. 02Takes 8.5 as points or 85% as a percent, and refuses anything that is not a score, with the reason spoken and shown.
  3. 03Keeps the student names and the headers in view while the grid scrolls, in both directions.
  4. 04Scrolls inside its own box: on a phone the grid moves sideways and the page does not.
  5. 05Averages each student and each assignment by percent, so a 10 mark quiz and a 30 mark project weigh the same. An empty cell is not graded, never a zero.
  6. 06Writes a score under the pass mark in the error colour and reads it as below the pass mark; an empty cell is a muted dash. An optional heat tint shades scores by percent.

States

Cell committed
The colour moves to the new score and the averages update
120ms, ease-out
Invalid score
The cell stays open, turns red and says why
0ms
Reduced motion
Tints change with no fade
0ms

Works with

When to use

When to use

  • Entering scores for a class by keyboard, like a spreadsheet.
  • End of term averages and an export for the school system.

When not to use

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Gradebook to my app and wire it to my own data.
  • I need entering scores for a class by keyboard, like a spreadsheet. Set that up with the Knowns UI Gradebook.
  • Which Gradebook props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "gradebook" }) and search_docs({ query: "gradebook" }). Pro props, full examples and source come back once your license key is in the MCP config.

Need help?

Stuck on Gradebook, or found something off? We read every message.