Skip to content

Answer Pad

The student's phone view: big tap targets, one answer, locked after it is sent, with waiting, right and wrong states.

On this page
Used for
  • A student's phone in a live quiz
  • A classroom response screen
  • A poll vote

Examples

Installation

npx knowns-ui@latest add answer-pad
For Claude Code, Cursor or Codex: installs it and wires the props to your own data.

Props

question
QuizQuestion
single, multi, truefalse or short.
onSubmit
(value: string[]) => void | Promise<void>
Called once. The pad locks at once; a rejection keeps the answer queued and retries when the phone is back online.
revealed
boolean
Defaultfalse
Show right or wrong and mark the right choices.
closed
boolean
Defaultfalse
Time is up and no answer was sent.
secondsLeft
number
The clock, top right.
sent
string[]
An answer already sent: the pad opens locked.

What it handles

  1. 01Gives each choice a tap target at least 96px tall.
  2. 02Locks the pad on the first answer and shows it at once, then sends it in the background.
  3. 03Keeps an answer that failed to send, says so, and sends it again when the phone is online.
  4. 04Handles pick one, pick several (with Lock in), true or false and a typed answer.
  5. 05Shows right, partly right or wrong when the teacher reveals, with the right choices marked.

States

Tap
The tile presses in, then fills
120ms, ease-out
Locked
The other tiles dim
120ms, ease-out
Reveal
Right tiles go green, a wrong pick goes red
120ms, ease-out
Reduced motion
No transitions
0ms

Works with

When to use

When to use

  • A student's phone during a live quiz: tap once, see it lock, wait for the reveal.
  • A quick class poll where an answer must not be lost on a weak connection.

When not to use

  • A graded test with many questions on one screen: use the quiz player.
  • The teacher's or the audience's view: use Live Results.

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 Answer Pad to my app and wire it to my own data.
  • I need a student's phone during a live quiz: tap once, see it lock, wait for the reveal. Set that up with the Knowns UI Answer Pad.
  • Which Answer Pad props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "answer-pad" }) and search_docs({ query: "answer pad" }).

Need help?

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