Type
MatFormProps
@ng-forge/dynamic-forms-material
Material-specific props that can be set at form level and cascade to all fields.
This is the same type as MaterialConfig used in .
Using a single type ensures consistency between library-level and form-level configuration.withMaterialFields()
The cascade hierarchy is: Library-level → Form-level → Field-level
Signature
type MatFormProps = MaterialConfig;Properties
| Name | Type | Description |
|---|---|---|
appearance ? | MatFormFieldAppearance | Default appearance for Material form fields |
subscriptSizing ? | SubscriptSizing | Default subscript sizing for Material form fields |
disableRipple ? | boolean | Whether to disable ripple effects by default |
color ? | ThemePalette | Default color theme for form controls (checkboxes, radios, sliders, toggles) |
labelPosition ? | "before" | "after" | Default label position for checkboxes and radios |
floatLabel ? | FloatLabelType | Default float label behavior for form fields |
hideRequiredMarker ? | boolean | Whether to hide the required marker by default |
Examples
const config: MatFormConfig = {
defaultProps: {
appearance: 'outline',
subscriptSizing: 'dynamic',
color: 'accent',
},
fields: [
{ type: 'mat-input', key: 'name', label: 'Name' },
],
};packages/dynamic-forms-material/src/lib/types/form-config.ts:26