Skip to content
uiify

Form Error Summary

A server-rendered summary linking each error to its field.

Browsers
Chrome 123+Firefox 121+Safari 17.5+
Tier
0
Forced layout budget
0 ms
Axe budget
0
SSR compatible
Yes
Published contract
Test harness

Playground

Form Error Summary

There is a problem

Enter a valid email address

Use at least 8 characters

Examples

A single field error

The summary link focuses the matching field. Keep the same error below the field with aria-describedby; the static summary does not announce or move focus automatically.

There is a problem

Choose a project name

import { FormErrorSummary, Input } from "@gunkin/uiify";

export default function Example() {
  return (
    <form className="example-form" aria-label="Project details">
      <FormErrorSummary aria-label="Project errors" title="There is a problem" errors={[{ href: "#form-error-summary-single-project", message: "Choose a project name" }]} />
      <div className="example-field">
        <label htmlFor="form-error-summary-single-project">Project name</label>
        <Input id="form-error-summary-single-project" name="project" invalid autoComplete="off" aria-describedby="form-error-summary-single-project-error" />
        <p className="example-error" id="form-error-summary-single-project-error">Choose a project name</p>
      </div>
    </form>
  );
}

API

FormErrorSummary

PropTypeDefaultDescription
title*ReactNode—Visible heading for the summary.
errors*readonly { href: string; message: ReactNode }[]—Each href must target the id of its corresponding field.
className / style / ref / native section propsnative section props—Native section props, styles, events, and ref are forwarded.
renderReactElement | ((props, state) => ReactElement)—Replace the rendered element while keeping behavior and accessibility wiring.

Keyboard

KeyAction

Accessibility

Static section containing a heading and links to the supplied error targets. Every href must point to a real field id. This summary adds no alert role, live region, focus movement, or validation logic; fields retain their labels and inline aria-describedby relationships. Empty errors render nothing.

Styling hooks

data-uiify-form-error-summarydata-part="title|list|item|link"