ErrorSummary
The accessible "fix these N things" banner shown at the top of a form after a failed submit.
Signature
Density
Viewport
Theme and light/dark are set in the top barWhen to use
The accessible "fix these N things" banner shown at the top of a form after a failed submit.
Accessibility
Always render a visible <label> (the label prop wires htmlFor/id for you). Errors set aria-invalid and are announced via aria-describedby. Required fields expose aria-required.
Install and import
npx shadcn@latest add @prism/error-summary
import { ErrorSummary } from '@/components/prism/ErrorSummary';
In a no-build prototype, read it from the bundle instead: const { ErrorSummary } = window.PrismDesignSystem_39d121;
Props
| Prop | Type | Required | Description |
|---|---|---|---|
errors | FormError[] | Yes | |
title | React.ReactNode | — |