Error Summary

Error Summary is a copy-paste React component that stops users miss errors on long forms 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/error-summary
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 3 extra npm packages
  • A11y guidance in docs

StopsUsers miss errors on long forms

Was this component page useful?

How do I install Error Summary?

pnpm dlx shadcn@latest add @bollard/error-summary

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

How do I use Error Summary in React?

error-summary-usage.tsx
import { ErrorSummary, useFormErrors } from "@/components/ui/error-summary"

<ErrorSummary {...form.summaryProps} prefixTitle={false} />

What input mistakes does Error Summary catch?

  • Errors missed on long forms, listed in one place on submit
  • Finding the field, by linking each error to it
  • Progress, by ticking off fixed errors live

What props does Error Summary accept?

ErrorSummary props
PropTypeDefault
items* (required)

Errors from the last failed submit, in field order. Renders nothing when empty.

SummaryItem[]—
focusSignal* (required)

Increment on every failed submit; each change moves focus to the summary.

number—
title

Heading while errors remain.

string"There is a problem"
fixedTitle

Heading once every error is fixed.

string"All fixed. You can submit again."
prefixTitle

Prefix `document.title` with "Error: " while errors remain, as GOV.UK recommends.

booleantrue

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

How is Error Summary accessible?

  • Takes focus on submit (tabIndex=-1) and is labelled by its title
  • Each link moves focus to its field
  • Fixed items say "Fixed:" in text; progress changes are aria-live="polite"
  • Motion respects prefers-reduced-motion

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

What are the limitations and server boundaries?

  • Lists the errors you pass; validation is up to you
  • Linking to a field needs the field's id to match the error item

What expensive mistakes does Error Summary stop?

Users miss errors on long forms

Also known as

form validation · error summary · gov.uk · react hook form · zod · a11y · inline errors · useFormErrors

What dependencies does Error Summary require?

Error Summary facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameError Summary
Registry identifier@bollard/error-summary
Install commandnpx shadcn@latest add @bollard/error-summary
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)
Dependencies@number-flow/react, lucide-react, motion
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 Error Summary

What form validation mistake does Error Summary catch?

Error Summary prevents users miss errors on long forms. A GOV.UK-style error summary that takes focus on submit, links each error to its field and ticks errors off as they are fixed. Catches: Errors missed on long forms, listed in one place on submit, Finding the field, by linking each error to it, Progress, by ticking off fixed errors live. Limitation: validate error-summary schemas on backend.

How do I install error-summary with shadcn?

Run `npx shadcn@latest add @bollard/error-summary`. Sources added: registry/default/error-summary/error-summary.tsx. Package requirements: @number-flow/react, lucide-react, motion.

What props customize Error Summary?

Error Summary accepts `items`, `focusSignal`, `title`, `fixedTitle`, `prefixTitle`. Configures form validation, error summary, gov.uk behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of error-summary?

Lists the errors you pass; validation is up to you. Linking to a field needs the field's id to match the error item Server requirement: backend verification for error-summary.

How does Error Summary meet accessibility guidelines?

Takes focus on submit (tabIndex=-1) and is labelled by its title. Each link moves focus to its field. Fixed items say "Fixed:" in text; progress changes are aria-live="polite". Motion respects prefers-reduced-motion. Minimizes errors: form errors not visible, cant find which field invalid.

Which components pair with Error Summary?