Forms
Field
Ties a control to its label, description, and error message. Built-in browser validation shows right away.
src/components/ui/field.tsxBehavior from @ui-sdk/react/field
A form with validation
Import
tsx
import { Field, FieldDescription, FieldError, FieldLabel } from "@/components/ui/field";Guidelines
- Every form control sits in a
Fieldwith aFieldLabel. - Write an error message per kind with
match, such asvalueMissingortypeMismatch.