- Components
- Forms
Field
shadcn's Field API: label, control, description and error. In vertical fields the label lives inside the input, above the value.
Installation#
npx shadcn add @ortaui/fieldExamples#
Vertical#
We never share it.
Name is required.
Label on top#
Horizontal and groups#
API reference#
| Prop | Type | Default | Description |
|---|---|---|---|
| orientation | "vertical" | "horizontal" | "responsive" | "vertical" | On Field. Layout of label and control. |
| labelPosition | "inset" | "top" | "inset" | On Field. "inset" puts the label inside an Input or Textarea, above the value (vertical only); "top" keeps it above the control. |
| errors | { message?: string }[] | - | On FieldError. Alternative to children. |
| className | string | - | Merged with the component classes via cn(). |