About
A dismissible form submission error summary that lists field errors as links which jump to and focus the matching invalid input.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Form Error Summary to your project and fits it to your theme.
Code
How Form Error Summary is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import {
FormErrorSummary,
FormErrorSummaryTitle,
FormErrorSummaryList,
FormErrorSummaryLink,
} from "@/components/ui/form-error-summary";
export default function FormErrorSummaryDemo() {
return (
<div className="w-full max-w-md">
<FormErrorSummary focusOnMount>
<FormErrorSummaryTitle />
<FormErrorSummaryList>
<FormErrorSummaryLink fieldId="email">
Email is required
</FormErrorSummaryLink>
<FormErrorSummaryLink fieldId="password">
Password must be at least 8 characters
</FormErrorSummaryLink>
</FormErrorSummaryList>
</FormErrorSummary>
<div className="mt-4 grid gap-3">
<label htmlFor="email" className="text-sm font-medium text-foreground">
Email
</label>
<input
id="email"
className="h-9 rounded-md border border-input bg-background px-3 text-sm text-foreground"
placeholder="you@example.com"
/>
<label
htmlFor="password"
className="text-sm font-medium text-foreground"
>
Password
</label>
<input
id="password"
type="password"
className="h-9 rounded-md border border-input bg-background px-3 text-sm text-foreground"
/>
</div>
</div>
);
}
















