KodeKarsa UI

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

Ringkasan mingguan dikirim ke alamat ini.

Import

tsx
import { Field, FieldDescription, FieldError, FieldLabel } from "@/components/ui/field";

Guidelines

  • Every form control sits in a Field with a FieldLabel.
  • Write an error message per kind with match, such as valueMissing or typeMismatch.