FormErrorSummary (ui/form-error-summary.tsx)

pulld · registry/ui/form-error-summary.tsx · typescript · MIT
ui, UI / Frontend

Module exposing: FormErrorSummary, focusField

// Source: https://github.com/yu-shell/pulld | License: MIT | Copyright 2026 pulld
// Provided via justclaw.it.com; keep this notice with the code.
"use client"

import * as React from "react"
import { CircleAlert } from "lucide-react"

import { cn } from "@/lib/utils"

export interface FormErrorSummaryItem {
  /**
   * `id` of the invalid control, or of the wrapper for a grouped control (radio
   * group, custom select). Omit it for form-level errors that belong to no
   * single field — those render as plain text instead of a link.
   */
  fieldId?: string
  /** The message, worded the same as the field's own inline error. */
  message: string
}

interface FormErrorSummaryProps
  extends Omit<React.ComponentPropsWithoutRef<"div">, "title"> {
  /**
   * The failed validations, in the orde

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key