Feedback
ErrorSummary
A linked summary of fields that need correction.
components.ErrorSummary · ErrorSummaryProps
Preview
Open standalone preview →Please check the following fields
Enter a project name.
Use it well.
Point each error ID at an actual control. Pair it with Field or other per-control error descriptions and preserve submitted values.
Explore the full demo →Templ example
Download example.templThis is the source compiled for the preview. Select the text to copy it, or download the file. Change the package name and demo routes for your application.
package examples
import "github.com/Tend-Stack/GothUI/v2026/components"
templ ExampleErrorSummary() {
@components.ErrorSummary(components.ErrorSummaryProps{Errors: []components.FieldError{{ID: "sample-invalid-name", Message: "Enter a project name."}}})
{{ field := components.FieldProps{ID: "sample-invalid-name", Label: "Project name", Error: "Enter a project name.", Required: true} }}
@components.Field(field) {
<input type="text" name="name" { field.ControlAttributes()... }/>
}
}