# `ShadcnUI.Components.Forms.Field`
[🔗](https://github.com/pcharbon70/shadcn_ui/blob/main/lib/shadcn_ui/components/forms/field.ex#L1)

Relationship-aware layout for one caller-owned native form control.

`field` normalizes identity, values, errors, and presentation state, then
passes the protected control attributes to the required `control` slot. It
does not create a form, changeset, validation lifecycle, or submission.

# `field`

Renders label, caller-owned control, optional help, and visible field errors.

The control slot receives a map containing `id`, `name`, `value`,
`aria_describedby`, `aria_invalid`, `required`, `disabled`, and `pending`.

## Attributes

* `field` (`:any`) - Defaults to `nil`.
* `id` (`:string`) - Defaults to `nil`.
* `name` (`:string`) - Defaults to `nil`.
* `value` (`:any`) - Defaults to `{:shadcn_ui, :not_provided}`.
* `errors` (`:any`) - Defaults to `{:shadcn_ui, :not_provided}`.
* `error_mode` (`:atom`) - Defaults to `:used_input`. Must be one of `:used_input`, `:always`, or `:hidden`.
* `used` (`:boolean`) - Defaults to `false`.
* `translate_error` (`:any`) - Defaults to `nil`.
* `pending` (`:boolean`) - Defaults to `false`.
* `required` (`:boolean`) - Defaults to `false`.
* `optional` (`:boolean`) - Defaults to `false`.
* `disabled` (`:boolean`) - Defaults to `false`.
* `describedby` (`:any`) - Defaults to `nil`.
* `class` (`:any`) - Defaults to `nil`.
* Global attributes are accepted.
## Slots

* `label` (required)
* `control` (required)
* `help`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
