Field
Connects a control with its label, supporting text, and validation message.
@rivetui/fieldPreview
Explore each composition interactively, then open its code in the same context.
Field anatomy
Compose labels, descriptions, controls, and validation messages as one semantic field.
Note
Input types and standalone input states are documented on the Input page; Field is responsible for the surrounding form structure.
Required and disabled
Keep native form semantics on the control while Field provides the explanatory context.
Unavailable while the project is archived.
Registry
Installation
Add the component source and its declared dependencies with the shadcn CLI.
Install component
bunx --bun shadcn@latest add @rivetui/fieldPublic interface
API reference
Component-specific props are listed here. Native element and Base UI props continue to pass through.
Field
| Prop | Type | Default |
|---|---|---|
className | string | — |
FieldError
| Prop | Type | Default |
|---|---|---|
role | React.AriaRole | "alert" |