useFieldRenderer
Overview
A helper composable that computes the derived props and metadata needed to render a field & widget pair, via FieldRenderer.
This composable abstracts out logic around:
- Slot scoping (e.g. field(x), widget(y), default)
- Widget and field component resolution
- Prop merging across field context, object-grid slots, and attribute passthrough
- Theme resolution for
themeOverridevalues - Auto-naming the field input for context or standalone usage
Signature
useFieldRenderer(props, attrs, slots, fieldSetContext)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| props | FieldRendererProps | yes | The props from the FieldRenderer component. |
| attrs | object | yes | Raw useAttrs() output (e.g. class, id, etc.). |
| slots | Readonly | yes | Raw useSlots() output, for detecting scoped slot names. |
| fieldSetContext | any | no | The injected field context if inside a fieldset; used to compute full path names. |
Returns
any
- The reactive field renderer instance.
Source
client/lib/use/useFieldRenderer.js:59