FieldComponent
@ng-forge/dynamic-forms
Type utility for extracting component input properties from field definitions.
Transforms field definition properties into Angular component input signals, enabling type-safe component binding with automatic signal creation.
Signature
type FieldComponent<T extends FieldDef<unknown, FieldMeta>> = Prettify<WithInputSignals<Pick<T, IncludedKeys>>>;Type Parameters
Properties
| Name | Type | Description |
|---|---|---|
hidden | Signal<T["hidden"]> | Whether the field is hidden from view. When true, the field is not rendered in the UI but still participates in form state and validation. Useful for conditional field display. @value false |
label | Signal<T["label"]> | Human-readable field label displayed to users. Provides accessible labeling for form fields and is typically displayed above or beside the field input. Supports static strings, translation keys, Observables, and Signals for dynamic content. |
className | Signal<T["className"]> | Additional CSS classes for custom styling. Space-separated string of CSS class names that will be applied to the field container for custom styling. |
tabIndex | Signal<T["tabIndex"]> | Tab index for keyboard navigation. Controls the order in which fields receive focus when navigating with the Tab key. Follows standard HTML tabindex behavior. |
Examples
```typescript
// Field definition
interface MyFieldDef extends FieldDef<MyProps> {
customProp: string;
}
// Component using FieldComponent typepackages/dynamic-forms/src/lib/definitions/base/field-def.ts:315