Unanswered Check

Unanswered Check is a copy-paste React component that stops test submitted with questions skipped before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/unanswered-check
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsTest submitted with questions skipped

Was this component page useful?

How do I install Unanswered Check?

pnpm dlx shadcn@latest add @bollard/unanswered-check

The files land in your project. They're yours to edit.

How do I use Unanswered Check in React?

unanswered-check-usage.tsx
import { UnansweredCheck, type ExamQuestion } from "@/components/ui/unanswered-check"

<UnansweredCheck
  questions={questions}
  endsAt={endsAt}
  onJump={setCurrent}
  onSubmit={() => new Promise<void>((resolve) => setTimeout(() => (setSubmitted(true), resolve()), 700))}
/>

What input mistakes does Unanswered Check catch?

  • Required and optional questions left blank
  • Partly answered questions ("1 of 2 chosen")
  • Questions flagged for review
  • Answers not yet saved to the server
  • Time left and how much each open question gets

What props does Unanswered Check accept?

UnansweredCheck props
PropTypeDefault
questions* (required)

Every question with its answered, required, flagged and saving state.

ExamQuestion[]—
mode

`exam`: blanks are allowed but cost marks, so submitting with them takes a second click. `survey`: required questions must be answered.

"exam" | "survey""exam"
endsAt

When time runs out. Leave out for untimed tests.

Date | number—
now

Fixed "now" for previews and tests. Defaults to a live clock.

Date | number—
lowTime

Turns the timer amber below this many ms; red below a fifth of it.

number5 * 60_000
onJump* (required)

Go to a question.

(id: string) => void—
onTimeUp

Called once when the time runs out, so the host can auto-submit.

() => void—
onSubmit* (required)

Final submit. Return a promise to show a pending state; a rejection keeps the answers and says so.

() => void | Promise<void>—
heading

Heading of the check.

string"Before you submit"
requiredLabel

Heading for unanswered required questions.

string"Not answered"
optionalLabel

Heading for unanswered optional questions.

string"Optional, not answered"
partialLabel

Heading for partly answered questions.

string"Partly answered"
flaggedLabel

Heading for questions flagged for review.

string"Flagged for review"
allDoneText

Shown when everything is answered.

string"Every question is answered."
autoSubmitText

Templates: `{count}` and `{each}` are filled in.

string"At 0:00 your answers are submitted as they are."
paceText

Time per open question.

string"About {each} for each of the {count} still open."
lastSecondsText

Warning in the last seconds.

string"Submit now: the last seconds can be lost to a slow conne…
submitLabel

Label of the submit button.

string"Submit"
submitWithBlanksLabel

Label when blanks remain.

string"Submit with {count}"
confirmLabel

Label of the second click to submit with blanks.

string"Blanks score 0. Submit anyway"
needRequiredLabel

Label when required questions block submit.

string"Answer {count} required to submit"
savingLabel

Label while answers are saving.

string"Saving {count}…"
pendingLabel

Label while onSubmit runs.

string"Submitting…"
errorText

Shown when onSubmit rejects.

string"Not submitted. Your answers are kept, try again."
goToLabel

Accessible label of a question jump button.

(question: string, note?: string) => string(question, note) => `Go to question ${question}${note ? `…
notAnsweredSrText

Screen-reader note on a flagged question that has no answer.

string", not answered"

* required. Also accepts the native props of <section> (className, aria-*, data-*…), passed through to it.

How is Unanswered Check accessible?

  • Section labelled by its heading; countdown is role=timer with an aria-label
  • Jump links have aria-labels including notes
  • Status in a polite live region; errors use role=alert

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

This is a UX guard rail. Enforce on the server: Enforce required answers and the deadline on the server; accept submissions only once all answers are saved.

  • Only knows the question states you pass
  • Time limits and auto-submit rely on your onTimeUp and server timing

What expensive mistakes does Unanswered Check stop?

Test submitted with questions skipped

Also known as

quiz · exam · test · survey · questionnaire · mcq · assessment · google forms

What dependencies does Unanswered Check require?

Unanswered Check facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameUnanswered Check
Registry identifier@bollard/unanswered-check
Install commandnpx shadcn@latest add @bollard/unanswered-check
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Unanswered Check

What form validation mistake does Unanswered Check catch?

Unanswered Check prevents test submitted with questions skipped. Lists blank, partial and flagged questions before a test or survey is submitted, with jump links and time left. Catches: Required and optional questions left blank, Partly answered questions ("1 of 2 chosen"), Questions flagged for review, Answers not yet saved to the server, Time left and how much each open question gets. Limitation: validate unanswered-check schemas on backend.

How do I install unanswered-check with shadcn?

Run `npx shadcn@latest add @bollard/unanswered-check`. Sources added: registry/default/unanswered-check/unanswered-check.tsx. Package requirements: lucide-react.

What props customize Unanswered Check?

Unanswered Check accepts `questions`, `mode`, `endsAt`, `now`, `lowTime`. Configures quiz, exam, test behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of unanswered-check?

Only knows the question states you pass. Time limits and auto-submit rely on your onTimeUp and server timing Server requirement: Enforce required answers and the deadline on the server; accept submissions only once all answers are saved.

How does Unanswered Check meet accessibility guidelines?

Section labelled by its heading; countdown is role=timer with an aria-label. Jump links have aria-labels including notes. Status in a polite live region; errors use role=alert. Minimizes errors: submitted quiz with blanks, missed questions in exam.

Which components pair with Unanswered Check?